Systems and methods for automating conversion of drawings to indoor maps and plans

ABSTRACT

Automating conversion of drawings to indoor maps and plans. One example is a computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; creating a floor-level outline; sensing furniture depicted on the floor, the sensing creates set of furniture entities; identifying a room depicted in the CAD drawing; and creating the indoor map for a floor using the floor-level outline, the room-level outline and the room identity.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No. 17/732,652 filed Apr. 29, 2022 titled “Systems and Methods for Automating Conversion of Drawings to Indoor Maps and Plans.” The '652 Application claims the benefit of U.S. Provisional Application No. 63/318,522 filed Mar. 10, 2022 and titled “Systems and Methods for Automating Conversion of Drawings to Indoor Maps and Plans.” Both applications are incorporated herein by reference as if reproduced in full below.

BACKGROUND

Indoor navigation using a portable computer (e.g., cellular phone) is a subset of overall navigation. In indoor navigation, the ability for the portable computer to receive signals from global positioning system (GPS) satellites may be limited, and thus portable computers may determine indoor location using signals from locally placed beacon devices, such as Bluetooth Low Energy (BLE) devices or Ultra Wide Band (UWB) devices. Knowing the location of the portable computer relative to beacon devices is only part of the process. Conveying the location information to the user may also involve showing the user's position on an indoor map, and perhaps even providing route guidance to arrive at the endpoint location.

Indoor maps may be created from architectural drawings, such as CAD drawings generated by the architect as the basis to buildout the indoor space. However, there are no universal standards for the contents of architectural drawings. For example, one architect may call a room a “meeting room” and a second architect may call the same room a “conference room.” Moreover, the symbols used by one architect to depict objects (e.g., furniture) are likely not the same as the symbols used by another architect to depict the same objects.

Notwithstanding the lack universal standards for architectural drawings, the CAD drawings are merely data depicting points, lines, polygons, and text stored with the computer file that is the CAD drawing. The points, lines, polygons, and text do not inherently identify the depicted space or location within the building. For example, a set of lines within the CAD drawing may depict a room, and another set of lines may depict a door into the room. However, the lines are not inherently a room, as lines could be used to depict many different objects (e.g., outside walls, inside walls, conference tables). At very fine detail, it may be that the lines that depict the walls of the room do not even touch on the respective ends.

For these reasons, and many others, creating indoor maps from the architectural CAD drawings is a cumbersome process. While some “automated” tools exist, those tools require significant human interaction at many stages throughout the process. Thus, any method or system that increases the automation of creating indoor maps from CAD drawings would provide a competitive advantage in the marketplace.

SUMMARY

One example is a computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; determining, by a device, a floor depicted in the CAD drawing by applying the CAD raster-image, the CAD vector-image, and the text database to a floor-level machine-learning algorithm, the determining results in a floor-level outline; sensing, by a device, furniture depicted on the floor by applying the floor-level outline, the CAD vector-image, and the text database to a furniture-level machine-learning algorithm, the sensing creates a set of furniture entities; identifying, by a device, each room depicted in the CAD drawing by applying the floor-level outline, the set of furniture entities, CAD vector-image, and the text database to room-level machine-learning algorithm, the identifying creates a plurality of room-level outlines; and creating, by a device, an indoor map by combining the set of furniture entities and the plurality of room-level outlines.

Another example is a computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing and thereby creating a modified CAD drawing, a text database containing text from the modified CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; creating, by a device, a floor-level bounding line that encircles a floor depicted in the modified CAD drawing, the creating by applying the CAD raster-image, the CAD vector-image, and the text database to a floor-level machine-learning algorithm; applying, by a device, an active contour model to an initial floor-level segmentation created from the floor-level bounding line, the active contour model creates an intermediate floor outline that delineates the floor; removing, by a device, drawing-entities from the modified CAD drawing that are a predetermine distance away from the intermediate floor outline to create a final floor outline; and creating, by a device, an indoor map for the floor using the final floor outline.

Another example is a computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; determining, by a device, a floor depicted in the CAD drawing, the determining results in a floor-level bounding line; sensing, by a device, furniture depicted on the floor by applying the floor-level bounding line, the CAD vector-image, and the text database to machine-learning algorithms, the sensing results in a plurality of furniture entities and associated location information; identifying, by a device, each room depicted in the CAD drawing within the floor-level bounding line, the identifying results in a plurality of room outlines; and creating, by a device, an indoor map for the floor by combining the plurality of furniture entities and associated location information with the plurality of room outlines.

Another example is a computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; creating, by a device, a floor-level outline; sensing, by a device, furniture depicted on the floor, the sensing creates set of furniture entities; identifying, by a device, a room depicted in the CAD drawing by: applying the floor-level outline and the CAD vector-image to a first machine-learning algorithm to produce a room-level bounding line and a first probability distribution regarding identity of the room; applying the room-level bounding line and the text database to a second machine-learning algorithm to produce a second probability distribution regarding identity of the room; applying the first and second probability distributions to a third machine-learning algorithm to generate a room identity; and selecting, based on the room-level bounding line, a room-level outline; and creating, by a device, the indoor map for a floor using the floor-level outline, the room-level outline and the room identity.

While the preceding examples are presented as computer-implemented methods, such examples may be equivalently stated as non-transitory computer-readable mediums and/or computer systems.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of example embodiments, reference will now be made to the accompanying drawings in which:

FIG. 1 shows a flow diagram of a method in accordance with at least some embodiments;

FIG. 2 shows a flow diagram of preprocessing in accordance with at least some embodiments;

FIG. 3A shows a rendering of a CAD drawing depicting an overhead view of a floor of a building, in accordance with at least some embodiments;

FIG. 3B shows a rendering of a CAD drawing depicting an overhead view of a floor of a building with leader lines and text removed, in accordance with at least some embodiments;

FIG. 4A shows a partial rendering of CAD drawing depicting an overhead view of desk, desk chairs, and guest chairs, in accordance with at least some embodiments;

FIG. 4B shows a partial rendering of CAD drawing depicting an overhead view of the desk and desk chair after simplification, in accordance with at least some embodiments;

FIG. 5A shows a partial rendering of CAD drawing depicting an overhead view of a portion of a building containing cross-hatching, in accordance with at least some embodiments;

FIG. 5B shows a partial rendering of CAD drawing depicting an overhead view of a portion of a building with the cross-hatching removed, in accordance with at least some embodiments;

FIG. 6 shows, in block diagram form, the floor detection in accordance with at least some embodiments;

FIGS. 7A and 7B show a flow diagram of the floor post processing in accordance with at least some embodiments;

FIG. 8 show a series of overhead view drawings of the active contour model at various stages, in accordance with at least some embodiments;

FIG. 9 graphically shows an example of simplifying line segments within an incremental length of the bounding line, and in accordance with at least some embodiments;

FIG. 10A graphically shows an example of filtering drawing-entities in accordance with at least some embodiments;

FIG. 10B graphically shows filtering drawing-entities, continuing from FIG. 10A;

FIG. 11A graphically shows an example of converging remaining entities in accordance with at least some embodiments;

FIG. 11B graphically shows converging remaining entities, continuing from FIG. 11A;

FIG. 12 shows, in block diagram form, the furniture detection in accordance with at least some embodiments;

FIG. 13 graphically shows an example of furniture machine-learning algorithms in accordance with at least some embodiments;

FIG. 14 shows a flow diagram of the furniture post processing in accordance with at least some embodiments;

FIG. 15 graphically shows an example of a first portion of furniture post processing in accordance with at least some embodiments;

FIG. 16 graphically shows an example of a second portion of furniture post processing in accordance with at least some embodiments;

FIG. 17 shows, in block diagram form, the furniture detection in accordance with at least some embodiments;

FIG. 18 graphically shows an example of room-level machine-learning algorithms in accordance with at least some embodiments;

FIG. 19 shows a flow diagram of the room post processing in accordance with at least some embodiments;

FIGS. 20A and 20B show a flow diagram of the entity-based room post processing in accordance with at least some embodiments;

FIG. 21A graphically shows an example of entity-based room post processing in accordance with at least some embodiments;

FIG. 21B graphically shows converging remaining entities, continuing from FIG. 21A;

FIG. 22A graphically shows an example merging close lines in accordance with at least some embodiments;

FIG. 22B graphically shows merging close lines, continuing from FIG. 21A;

FIG. 23 shows a flow diagram of the graph-based room post processing in accordance with at least some embodiments;

FIG. 24 graphically shows an example of graph-based room post processing in accordance with at least some embodiments;

FIGS. 25A and 25B show a flow diagram of the entity-based room post processing in accordance with at least some embodiments;

FIG. 26 graphically shows an example of GAN-based room post processing in accordance with at least some embodiments;

FIGS. 27A and 27B show a flow diagram of the wall extraction in accordance with at least some embodiments;

FIGS. 28A, 28B, 28C, and 28D graphically show an example of wall extraction and merging of rooms and walls in accordance with at least some embodiments; and

FIG. 29 shows a computer system in accordance with at least some embodiments.

DEFINITIONS

Various terms are used to refer to particular system components. Different companies may refer to a component by different names—this document does not intend to distinguish between components that differ in name but not function. In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . . ” Also, the term “couple” or “couples” is intended to mean either an indirect or a direct connection. Thus, if a first device couples to a second device, that connection may be through a direct connection or through an indirect connection via other devices and connections.

“Bounding box” shall mean a closed line segment having four vertices.

“Bounding line” shall mean a closed line segment having four or more vertices. Thus, a bounding line may be, in some cases, a bounding box.

“CAD” shall mean computer-aided design.

“CAD drawing” shall mean a computer file containing data that, when rendered by a CAD program, shows a design. One example file format for a CAD drawing is the DXF format.

“Vector-image” shall mean a computer file containing data indicating relative locations of geometric shapes that, when rendered by a computer program, show a design.

“Raster-image” shall mean a computer file containing data indicating pixels of an array of a raster-graphics image that, when rendered by a computer program, show a design.

“Machine-learning algorithm” shall mean a computer algorithm, such as a convolution neural network, that creates a mathematical or computational model of relationships between input data and output data based on being trained by a set of training data, and then the machine-learning algorithm applies the mathematical or computational model to non-training data to produce predictions.

“Active contour model,” sometimes referred to as a snake algorithm, shall mean a deformable model that deforms in the direction of gradients, and stops deformation at high gradient locations.

“Generative adversarial network” or “GAN” shall mean two or more machine-learning algorithms (e.g., two neural networks) that work together (e.g., in an adversarial sense) to produce a room-level bounding-line.

The terms “input” and “output” when used as nouns refer to connections (e.g., software), and shall not be read as verbs requiring action. In systems implemented in software, these “inputs” and “outputs” define parameters read by or written by, respectively, the instructions implementing the function.

“Assert” shall mean changing the state of a Boolean signal. Boolean signals may be asserted high or with a higher voltage, and Boolean signals may be asserted low or with a lower voltage, at the discretion of the circuit designer. Similarly, “de-assert” shall mean changing the state of the Boolean signal to a voltage level opposite the asserted state.

“GeoJSON” shall mean an open standard geospatial data interchange format that represents geographic features and related non-spatial attributes.

DETAILED DESCRIPTION

The following discussion is directed to various embodiments of the invention. Although one or more of these embodiments may be preferred, the embodiments disclosed should not be interpreted, or otherwise used, as limiting the scope of the disclosure, including the claims. In addition, one skilled in the art will understand that the following description has broad application, and the discussion of any embodiment is meant only to be exemplary of that embodiment, and not intended to intimate that the scope of the disclosure, including the claims, is limited to that embodiment.

Various examples are directed to systems and methods for automating conversion of drawings to indoor maps and plans. The example process may be conceptually, though not necessarily physically, separated into preprocessing of the input CAD drawing, performing floor detection (e.g., first floor or story, second floor or story) within the CAD drawing, performing furniture detection for each floor, performing room detection for each floor, and then generating an indoor map based on the outputs from each stage. In many cases, the processing may proceed with little or no human interaction, and thus greatly improves the speed and quality of creating indoor maps from CAD drawings. The description now turns to a high-level overview.

FIG. 1 shows a flow diagram of an example computer-implemented method for automating conversion of drawings to indoor maps and plans. Each of the example steps is introduced here, and then discussed in detail below. In particular, the method starts 100 and comprises preprocessing 102. In the example preprocessing an input CAD drawing or original CAD drawing is subject to various reductions in complexity (e.g., removing leader lines, removing text) to create a modified CAD drawing. The modified CAD drawing may be the original computer file itself with various portions removed, or the modified CAD drawing may be a separately saved computer file (leaving the original CAD drawings unchanged). Still considering the example preprocessing 102, in various examples a text database may be created using text (e.g., words) extracted from the original CAD drawings. Moreover, to be useful for later steps, the text in the text database may be associated with location information indicating where, in the coordinate space of the CAD drawing, the text resided. Further still, the example preprocessing 102 may create representations of the CAD drawing in different file formats, such as creating a CAD vector-image based on the modified CAD drawing, and creating a CAD raster-image based on the modified CAD drawing. The modified CAD drawing, the text database, the CAD vector-image, and the CAD raster-image may be provided to the floor detection 104 stage.

The next example stage in the processing is the floor detection 104 stage. As the name implies, the floor detection 104 is used to detect stories or floors shown in the CAD drawings, and to generate a floor outline for each floor. For example, the original CAD drawing may show the layout of one or more floors of a building within a single computer file. The floor detection 104 identifies each floor shown in the CAD drawings. For buildings that have a uniform exterior footprint for all floors, the floor detection may be a relatively straightforward task—once the first floor outline is determined, all the floors have the same outline. However, for buildings that change shape with changing exterior elevation, or for CAD drawings in which only partial floors are depicted, determining the outline for each floor is more challenging. In various examples, the floor detection 104 may be implemented by applying the CAD raster-image, the CAD vector-image, and the text database to a floor-level machine-learning algorithm.

Still referring to FIG. 1 , the next example stage in the processing is furniture detection 106. As the name implies, the furniture detection 106 is used to sense furniture, and locations of the furniture, within the coordinate space of the CAD drawing. In various examples, the furniture detection 106 may be implemented by applying a floor-level bounding line, the CAD vector-image, and the text database to a furniture-level machine-learning algorithm. The furniture detection 104 is repeated for each floor found in the CAD drawings. The furniture-level machine-learning algorithm may create a plurality of furniture raster-images, one each for each floor. The furniture raster-image(s) may be supplied to the room detection 108 stage.

The next example stage in the processing is room detection 108. As the name implies, the room detection 108 is used to identify each room shown on each floor in the CAD drawing. The identifying may have two conceptual components: identifying a room outline; and identifying the intended use of the room (e.g., executive office, conference room, water closet). In various examples, the room detection 108 may be implemented by applying the output of the floor detection 104 (e.g., a floor outline), the output of the furniture detection 106 (e.g., furniture outlines), the CAD vector-image, and the text database to a room-level machine-learning algorithm. The room-level machine-learning algorithm may create a plurality of room outlines, one each for each room on each floor. The room outlines, and corresponding room identities, may be supplied to the export 110 stage.

Still referring to FIG. 1 , the next example stage is the export 110 stage. The export stage 110 is designed and constructed to conglomerate the floor outlines, the room outlines, the room identities, and the furniture outlines created by the prior stages, and create an indoor map (e.g., GeoJSON) for each floor depicted in the CAD drawing. And thereafter the method ends 112. Though the example flow diagram of FIG. 1 shows the process to be linear, the input data to the export 110 stage may be the output of any one or more of the prior stages directly. For example, the room detection 108 may receive as input the output from the floor detection and the output from the furniture detection. The specification now turns to preprocessing 102 in greater detail.

Preprocessing

FIG. 2 shows a flow diagram of the example preprocessing. CAD drawings may be implemented in many different file formats (e.g., DXF). The example CAD drawing may be a collection of data identifying points, lines, polygons, groups of objects, and text (e.g., words) within a file, and with each component having a location or set of locations in the coordinate space of the CAD drawing. For example, a line showing a wall may be represented by a line segment with two vertices, one vertex on each end of the line segment, and each vertex may define a location in the coordinate space of the CAD file. As other example, text (e.g., words) within the CAD drawing may be associated with a drawing-entity, such as a group of objects that represent furniture (e.g., a chair). The group of objects represented thus have a location within the coordinate space of the CAD drawing, and by being associated with the group of objects the text may likewise be associated with location information. In other cases, the text may have an attribute that directly associates the text with a location within the coordinate space of the CAD drawing, and thus the association of text with a drawing object is not strictly required.

The example workflow starts 200 and turns to parsing the original CAD drawing 202 to create scale information. In the example of FIG. 2 , the scale information is shown to be placed in the scale-information 204 database, but the scale information may be stored and passed to other stages in any suitable form (e.g., storage within a globally accessible memory).

The next step in the example process is identifying blocks and polylines 206, and similarly detecting text, arrows, and hatches 208. These two steps may be described as finding, within the CAD drawing, various drawing-entities of interest, and then where possible deleting unnecessary entities 210. The steps are described visually below in reference to example drawings objects, but for now the steps 206, 208, and 210 may be considered to be finding and removing drawing-entities within the CAD drawing that obfuscate underlying floor-level and room-level detection (e.g., leader lines, text, words), and likewise saving information that may be helpful later in identifying drawing objects (e.g., chair, desk) or identifying the purpose of an interior space (e.g., conference room, water closet). For example, the method of FIG. 2 may remove one or more of: leader lines from the CAD drawings; text from the CAD drawing; cross-hatching from the CAD drawing; and duplicate furniture entities from the CAD drawing. The identifying, detecting, and extraction or deletion thus creates (i.e., one of the outputs of block 210) a modified CAD drawing.

In example cases, the text information extracted from the CAD drawing is used to create a text database with associations, and the resultant is shown in FIG. 2 as a text database 214. The contents of the text database 214 are made available to later processing steps (e.g., floor detection 104, furniture detection 106, and room detection 108). In the example, the resultant modified CAD drawing is used as the input to create a vector-graphics 216 representation of the modified CAD drawing, the vector-graphics representation hereafter referred to as a CAD vector-image 218. The CAD vector-image 218 is made available to later processing steps (e.g., floor detection 104, furniture detection 106, and room detection 108). Finally, the CAD vector-image 218 is used as the input to rasterize the CAD drawings 220, resulting in a CAD raster-image 222. The CAD raster-image 222 is made available to later processing steps (e.g., floor detection 104, furniture detection 106, and room detection 108). Examples of the preprocessing 102 of FIG. 2 are shown graphically in the following figures.

FIG. 3A shows a rendering of a CAD drawing of an overhead view of a floor of a building. In particular, visible are many rooms, hallways, water closets, and the like. In many cases, the interior rooms are associated with arrows, lead lines, or leader lines, such as leader lines 300 and 302. In practice, each leader line is associated with the text to provide additional context for the identity and/or purpose of the object or space at the terminal end of the leader line, but in FIG. 3A such text information has already been removed (and placed in the text database). As alluded to above, the lines or polylines representing the leader lines may not inherently identifying themselves as leader lines. Thus, in example cases the leaders lines are identified (e.g., lines with the non-zero slope that cross other lines) and are removed from the CAD drawing. FIG. 3B shows the rendering of the modified CAD with the leader lines and text removed.

FIG. 4A shows a partial rendering of CAD drawing of an overhead view of desk, desk chairs, and guest chairs. In particular, FIG. 4A shows a desk, a plurality of desk chairs, and two guest chairs. Having a plurality of desk chairs may have been an oversight on the part of architect (e.g., multiple chairs placed but inadvertently moved to the background or made transparent). For purposes of later furniture detection, and as it relates to maps for indoor navigation, guest chairs and duplicate desk chairs provide little to no usable information, and thus in example cases the duplicate and unneeded entities are removed from the CAD drawing. With respect to duplicate drawing objects, when duplicate drawing objects are found within a predetermined distance of each other (e.g., less than greatest dimension of the drawing object), the duplicates entities may be removed. FIG. 4B shows the partial rendering of CAD drawing after simplification.

FIG. 5A shows a partial rendering of a CAD drawing of an overhead view of a portion of a building containing cross-hatching and text information. In particular, an architect may add cross-hatching to a CAD drawing for any number of reasons, such as to delineate different spaces, to aid in estimating distances within the spaces, to show control zones for thermostats, to name a few. However, as it relates to maps for indoor navigation, the cross-hatchings provides little, if any, relevant information. In fact, such cross-hatching may complicate later identification steps (e.g., room detection 108), and thus in example cases the cross-hatching (and associated coloring, if any), along with text, is removed from the CAD drawing. FIG. 5B shows the partial rendering of CAD drawing with the cross-hatching and text removed.

Thus, the result of the preprocessing is a modified CAD drawing with leader lines, text, duplicate entities, and cross-hatching removed. The text information, and associated location information, becomes the text database 214. The modified CAD drawing is used as the basis to create the CAD vector-image 218 and the CAD raster-image 222. The discussion now turns to the floor detection.

Floor Detection

Returning briefly to FIG. 1 . The discussion to this point has been directed to the preprocessing 102. The next step in the example computer-implemented method is the floor detection 104. FIG. 6 shows, in block diagram form, the example floor detection 104. In particular, the floor detection 104 may be conceptually, though not necessarily physically, divided into a floor-level machine-learning algorithm 600 and floor post processing 602. In example systems, the floor-level machine-learning algorithm 600 may be provided as input the CAD raster-image, the CAD vector-image, and the text database 214. The floor-level machine-learning algorithm 600 may be any suitable machine algorithm, such as a convolution neural network, trained with a set of curated training data. In example systems, the floor-level machine-learning algorithm 600 may produce a floor bounding line (e.g., a raster-image) that indicates the location of a floor shown the CAD drawing. To the extent the CAD drawing shows multiple stories or floors, the floor-level machine-learning algorithm produces a plurality of floor bounding lines, one each for each floor.

In example systems, each floor bounding line may be a raster-image that indicates the location of a floor shown the CAD drawing. The floor bounding line may not “tightly” show the exterior footprint of the floor. Rather, in some examples the floor bounding line depicts a polygon (e.g., a square) that fully encircles an identified floor, even though the floor may have a smaller and more complex exterior footprint. Stated otherwise, in the coordinate space of the CAD drawing, there may be non-zero offsets between the actual floor outline and an inside dimension of the floor bounding line. The specification now turns to the floor post processing 602.

The floor post processing 602 is summarized here first, and then described in greater detail below. In summary, starting from a floor bounding line created by the floor-level machine-learning algorithm, the floor post processing 602 creates an intermediate floor outline (e.g., raster-image) that indicates the outer footprint of the floor. The intermediate floor outline is then simplified, converted into an intermediate CAD drawing, and the intermediate CAD drawing is overlaid with the modified CAD drawing. The example floor post processing then removes drawing-entities that are a predetermined distance outside the intermediate floor outline, and removes drawing-entities that are a predetermine distance within the intermediate floor outline. Stated otherwise, the example floor post processing 602 removes drawing-entities from the modified CAD drawing that are a predetermine distance away from the intermediate floor outline. For various drawing-entities that remain, the drawing-entities are used to create a reduced-vertex shape, and thus a final floor outline, from which an indoor map may be created.

FIGS. 7A and 7B show a flow diagram of the example floor post processing 602. The floor post processing can be conceptually divided into an active contour model 700 to find a bounding line, smoothing the bounding line 702, filtering entities 704 based on the bounding line, and converging remaining entities 706. Each will be addressed in turn

—Active Contour Model

Referring to FIG. 7A, the first step in the example process is the active contour model 700. An active contour model may be equivalently referred to as a software snake. In summary, an active contour model is applied starting at the bounding line found by the floor-level machine-learning algorithm, with the resultant of the active contour model being an intermediate floor outline. In particular, the bounding line is used to crop the CAD vector-image 710, leaving just the portions of the CAD vector-image showing the identified floor (e.g., entire building, floor of the building). An active contour model or snake is initialized 712. The active contour model here is initialized larger than the floor (e.g., initialized at the bounding line of the floor), and then the active model “shrinks” inward based on gradient calculations. For example, gradients of the vector-image are calculated 714, and the snake moves in directions opposite the gradient vector 716. Magnitudes of the gradient vectors are calculated 718, and then a determination is made as to whether the average gradient is smaller than a threshold, as shown by determination 720. If the average gradient is larger than the threshold, then the example method retreats again to moving or shrinking the snake at process 716. At some point, the average gradient will be smaller than the threshold (i.e., the “Yes” path out of decision block 720), and thus the snake is considered converged snake 722. The result of the example process is an intermediate floor outline (e.g., raster image) that delineates the floor.

FIG. 8 shows a series of drawings in order to graphically explain the steps of running the active contour model 700. In particular, the upper drawing shows an overhead view of floor identified by the floor-level machine-learning algorithm. As alluded to in the discussion of the floor-level machine-learning algorithm, the resultant of the floor-level machine-learning algorithm is a bounding line that delineates the floor. As shown, there may be non-zero distances between the bounding line and the actual floor footprint. The active contour model 800 is initialized with an initial shape larger than the footprint of the floor, and as shown the initialization may be at the bounding line 802 (i.e., thick lines at the outer boundary are the initialized active contour model and are coextensive with the bounding line 802). The active contour model is moved based on the gradient in the drawing (i.e., is moved toward the floor or building). The middle drawing of FIG. 8 shows the active contour model 800 about mid-way through the process. That is, the active contour model has found some of the outline of the building or floor (e.g., the curved portions), but other portions of the active contour model 800 (e.g., the square corners) have yet to find gradients that result in movement ceasing for that incremental length of the active contour model. Finally, the lower drawing of FIG. 8 shows a condition in which the active contour model ceased movement based on the gradient criteria discussed above. It follows the resultant of the active contour model is an intermediate floor outline or building outline at the elevation of the floor.

—Smoothing the Bounding Line

Returning to FIG. 7A, the next step in the example method is smoothing the bounding line 702. That is, the floor outline found in the previous steps may comprise a plurality of line segments and may, in some senses, provide more detail than is needed for creation of indoor maps. Relatedly, because of operation of the active contour model, the floor outline may effectively contain many more line segments than strictly needed. In summary, in the example system the floor outline may be smoothed by selecting an incremental length of the floor outline, less than the entire floor outline, where the incremental length comprises a plurality of line segments. For the selected incremental length, an attribute of linearity is measured for a set of contiguous line segments. For any set of contiguous line segments for which the attribute of linearity is above a predetermined threshold, the set of line segments may be replaced with a single line segment. The measuring and replacing may be repeated for each set of contiguous line segments within the incremental length, and the process may be repeated for additional incremental lengths around the floor outline.

In particular, the example method takes as input the bounding line, the scale information 204, simplification thresholds 730, and the converged snake 722 or initial floor outline by the active contour model 700. Using the initial floor outline, the scale information 204, and the simplification thresholds 730, the example method calculates a distance 732 corresponding to one pixel of the raster-image comprising the floor outline. The next step in the example method is polygon simplification 734 (e.g., using Douglas Peucker algorithms). The resultant smoothed floor outline (e.g., again a raster image) may then be converted 736 into a CAD drawing for use in the further processing.

FIG. 9 graphically shows an example of smoothing within an incremental length of the floor outline. In particular, consider that the upper drawing shows an incremental length 900 of the floor outline, where the incremental length 900 itself has a length t less than the overall length T of the floor outline. The example incremental length 900 comprises three line segments 902, 904, and 906. Line segment 902 is contiguous with line segment 904. Line segment 904 is contiguous with line segment 906. As shown in the upper-middle drawing, first consider line segments 904 and 906. In example cases, an attribute of linearity is measured for a set of contiguous line segments; in this example the set comprising line segments 904 and 906. If the attribute of linearity is above a predetermined threshold, the set of line segments may be replaced with a single line segment. Referring to the lower-middle drawing, in example cases the attribute of linearity may comprise measuring an altitude A of a triangle formed by the set of contiguous line segments and a base B connecting opposite end of the set of contiguous line segments. If the altitude A is smaller than a predetermined threshold (e.g., smaller than a predetermined percentage of the length of the base B), then the line segments 904 and 906 may be replaced with single line segment 908, as shown in the lower drawing. A similar analysis may be performed between the line segment 902 and line segment 908 (or line segment 904), but in this example altitude is a larger percentage of a base line connecting the opposite ends of the line segments 902 and 908, and thus no line segment replacement takes place. The processing may be repeated for each set of contiguous line segments in the incremental length, and for each incremental length around the floor outline.

Returning to FIG. 7A, the next step in the example smoothing the bounding line 702 is converting 736 the floor outline into a CAD drawing. That is, the various simplifications performed (e.g., shown in FIG. 9 ) were assumed to take place within a raster-image containing the floor outline, and then the simplified raster-image is converted to a CAD drawing for the next steps in the example method. However, the simplifications discussed with respect the floor outline found by the active contour model may take place in any suitable file format.

—Filtering Entities

Turning to FIG. 7B. The next step in the example method is filtering entities 704. In summary, the example method may overlay the floor outline with the modified CAD drawing, identify drawing-entities within a zone defined by an inflated and deflated versions of the floor outline, and with the resultant being an identified a set of drawing-entities. More particularly, the example method may remove drawing-entities from the modified CAD drawing that are a predetermine distance away from the floor outline. To that end, in the example method the floor outline may be inflated and deflated. More particularly still, the floor outline may be inflated by a predetermined amount (e.g., 5% of a wall length, 10% of a wall length) to create an inflated bounding line. As part of filtering, any drawing-entities outside the inflated bounding line are removed. For example, if the CAD drawings show a tree disposed outside the building, the tree is likely to reside outside the inflated bounding line, and thus for purposes of determining the final floor outline, the tree may be removed. Moreover, the floor outline may be deflated by a predetermined amount (e.g., 5% of a wall length, 10% of a wall length) to create a deflated bounding line. As part of filtering, any drawing-entities located inside the deflated bounding line may be removed. For example, drawing-entities that depict interior walls and furniture that reside inside the deflated bounding line may, for purposes of determining the floor outline, be removed.

The filtering of the example method may further comprise operations on drawing-entities that reside between the inflated bounding line and the deflated bounding line. That is the say, the area between the inflated bounding line and the deflated bounding line (sometimes referred to as the snake patch) may contain many desirable drawing-entities (e.g., lines showing the exterior walls), but may also contain undesirable drawing-entities. The undesirable drawing-entities may include small stray lines (e.g., remnants of leaders lines), duplicate lines (e.g., two coextensive lines representing a single wall), and data errors that manifest as standalone vertices—termed spanned entities. Thus, the various spanned entities may be removed from the modified CAD drawing.

Referring specifically to the flow diagram of FIG. 7B, the example method may thus comprise inflating and deflating the snake 740. The inflation and deflation creates the inflated bounding line, the deflated bounding line, and thus the snake patch between the inflated line and the deflated line. Based on the inflated and deflated bounding lines, and the CAD vector-image, the various drawing-entities discussed above are filtered 742, leaving a set of entities 744 for further processing.

FIG. 10A graphically shows filtering entities 704 of the example method. In particular, consider that upper drawing represents a floor outline 1000 of a floor of a building, the floor outline 1000 as found by the example steps of FIG. 7A. Further, consider that the middle drawing 1002 is a portion of the modified CAD drawing showing a floor and various extraneous drawing-entities. In accordance with example methods, the floor outline 1000 may be overlaid with the middle drawing 1002 as shown by the lower drawing 1004. In some examples, the overlaying may be performed with both the floor outline 1000 and middle drawing 1002 in a CAD drawing format, but combining in other file formats, including mixed formats, is possible.

FIG. 10B graphically shows filtering entities 704 of the example method, continuing from FIG. 10A. As shown by upper drawing 1006, the floor outline may be inflated to create an inflated bounding line 1008, and the floor outline may be deflated to create the deflated bounding line 1010. The inflation and deflation of FIG. 10B are exaggerated for purposes of clarity, but again may be about +/−5% to 10% of the wall lengths. Moreover, the inflated bounding line 1008 and the deflated bounding line 1010 create a zone or area between them (i.e., the snake patch 1012).

The inflated bounding line 1008 and deflated bounding line 1010 delineate several categories of drawing-entities. For example, tree 1014 resides outside the inflated bounding line 1008. Within the snake patch 1012 resides various drawing-entities, such as outer walls of the floor (e.g., walls 1016 and 1018), short spanned entities 1020, and duplicate entity 1022 (i.e., a duplicate wall line). In practice, the duplicate entity 1022 may be hidden by being directly “behind” a line or set of lines showing the wall at that location, but duplicate entity 1022 is offset for clarity of the drawing. Inside the deflated bounding line 1010 resides various lines defining the rooms on the floor. In the example method, the drawing-entities that reside outside the inflated bounding line 1008, such as tree 1014, may be filtered or removed. Moreover, drawing-entities that reside inside the deflated bounding line 1010, including entities that cross the deflated bounding line 1010, may be filtered or removed. For example, all the interior lines (e.g., the lines depicting the rooms on the floor, furniture), may be removed.

Still referring to FIG. 10B, the lower drawing 1030 shows the remaining drawing-entities after having various entities outside the inflated bounding line 1008 removed, and having the various entities inside the deflated bounding line 1010 removed. Thus, the lower drawing 1030 shows a set of entities that may be passed to the next step in the example method.

—Converging Remaining Entities

Returning to FIG. 7B, and particularly to the portion directed to converging remaining entities 706. The example method takes as input the set of entities 744 from the filtering entities 704 and the floor outline or converged snake 722 from the active contour model 700 (as shown by bubble “B”). In summary, the example method removes from the snake patch 1012: spanned entities whose size is below a predetermined size (e.g., short spanned entities 1020); duplicate entities (e.g., duplicate entity 1022); and extra vertices. With the remaining set of entities in the snake patch 1012, the example method dilates the remaining entities, performs a unary union of the dilated entities to create a union shape; and attempts to find closed-loop path within the union shape. More precisely, example method determines an internal and external outline of the union shape. The external outline may be deflated or contracted, while the internal outline may be dilated or expanded. The example method selects either the inflated internal outline or the deflated external outline, the selection based on which outline has the lowest number of vertices. If the selected outline represents a closed-loop path, and if the closed-loop path meets a predetermined criteria, the final floor outline is generated from the closed-loop path.

More precisely then, the example method deletes short spanned entities, extra vertices, and duplicate entities 750. Before proceeding, a brief digression into shortcomings of CAD drawings is in order. It may be that, within the original CAD drawing, various drawing-entities (e.g., lines) that represent the exterior walls do not fully touch or “connect up.” At a drawing resolution where an entire floor is visible, the fact that two lines do not meet may not be evident or even relevant. However, the lack of continuity between drawing-entities (e.g., lines defining an outer wall of a floor) may cause issues in finding and refining the final floor outline. In order to address these potential shortcomings, the remaining entities are dilated with a given dilation increment 752. Thereafter, a unary union of the dilated entities is calculated, as shown by process 754, to create a unary entity or union shape. A determination 756 is made as to whether the union shape represents a closed-loop path. If no closed-loop path is found, this means the dilation was insufficient to make contiguous or “connect up” the drawing-entities, and the example method takes the “No” path out of the determination 764. Along the “No” path, the dilation increment is increased, and the dilation 752 and calculation of the unary union (process 754) are repeated until a closed-loop path is found (again determination 756).

Once a closed-loop path is found (e.g., the “Yes” path out of determination 756), the example method performs an exterior and interior fit 760 to find an exterior polygon of the union shape and an interior polygon of the union shape. In the example method, the exterior polygon is deflated, while the interior polygon is inflated, and a minimum or reduced vertex solution is selected, as shown by process 762.

The example method may continue refining of the closed-loop path in increments until the closed-loop path meets a predetermined criteria 764. For example, a Hausdorff distance may be calculated between reduced vertex solution and the floor outline or converged snake 722 (FIG. 7A). Assuming, for purposes of explanation, that the first reduced vertex solution does not meet the predetermined criteria (i.e., the “greater than threshold” path out of determination 764), the example method may again dilate the drawing-entities with an ever further increased dilation increment. When the closed-loop path and the floor outline meet the predetermined criteria 764 (i.e., the “smaller than threshold” path out of determination 764), the final reduced vertex solution becomes the final building outline 766. The specification now turns to a graphical explanation of converging remaining entities 706.

So as not to unduly lengthen the specification, not specifically shown in the graphical representations are the pre- and post-versions of removal of the short spanned entities 1020 (FIG. 10B), duplicate entities 1022 (FIG. 10B), and extra vertices. With that in mind, FIG. 11A graphically shows an example of converging remaining entities 706 in accordance with at least some embodiments. In order to convey various aspects of the further processing, the remaining drawing-entities are modified slightly from the discussion of FIGS. 10A and 10B. In particular, consider that the remaining drawing-entities within the snake patch are a group of lines that generally define the rectangular shape of the floor, but that those lines do not touch or do not fully “connect up” because of shortcomings of the original CAD drawing and/or because of a preprocessing step in which all the entities are “disconnected” or made non-contiguous. Thus, the upper drawing 1100 shows a set of remaining drawing-entities (e.g., lines 1102 and 1104) with exaggerated spacing, along with an example floor outline 1106. The separation of the floor outline 1106 from the various lines of the remaining drawing-entities is exaggerated for clarity. In some cases the upper drawing 1100 may be represented and be operated on in a vector-image format, but the operations may be performed in any suitable file format (e.g., CAD drawing format).

In accordance with example methods, the various lines are dilated with a dilation increment, and a resultant is shown as the upper-middle drawing 1108. In particular, the upper-middle drawing 1108 shows a situation in which dilation increment was insufficient to have all the dilated drawing-entities become contiguous, overlap, or “connect up.” For example, there are still gaps between the dilated line 1102 and the dilated line 1104. Similarly, the dilated lower line 1110 does not overlap or “connect up” with the other lines. As can be gleaned, any union of the drawing-entities of the upper-middle drawing 1108 will not result in a union shape defining a closed-loop path. Thus, the discussion assumes the example method retreats to dilation 752 (FIG. 7B) but with a larger dilation increment.

Still referring to FIG. 11A, the various lines are again dilated with a larger dilation increment, and an example resultant is shown in the lower-middle drawing 1112. In particular, the lower-middle drawing 1112 shows a case in which the dilation increment is sufficient to have all the lines become contiguous, overlap, or “connect up.” The next step in the example method is to perform a unary union or unioning operation, which combines all the dilated entities into a single polyline or union shape, as shown by the lower drawing 1114 comprising union shape 1116.

FIG. 11B graphically shows converging remaining entities 706, continuing from FIG. 11A. In particular, in the example method the interior and exterior outlines or polygons are extracted. The resultant is shown as the upper drawing 1118. That is, upper drawing 1118 shows the union shape 1116, along with an external outline 1120 and an interior outline 1122. Finding the external outline 1120 and interior outline 1122 may take any suitable form. For example, the upper drawing 1118 may be in, or converted to, a raster-image. A shrinking active contour model may be initialized outside the union shape 1116, and thus may be used to find the external outline 1120. An expanding active contour model may initialized within the union shape 1116, and thus may be used to find the interior outline 1122. In any event, the external outline 1120 and the interior outline 1122 are determined. The example exterior outline 1120 and interior outline 1122 are shown displaced slightly from the union shape 1116 for clarity of the drawing, but in practice the exterior outline 1120 abuts the union shape 1116 around its external periphery, and similarly the interior outline 1122 abuts the union shape 1116 within its internal periphery.

In the next step (block 758 of FIG. 7B) in the example method, the exterior outline 1120 is deflated by a predetermined percentage and the interior outline 1122 is inflated by the predetermined percentage, and a minimum or reduced vertex solution is determined (process 762 of FIG. 7B) as between the two. In some example cases, the predetermined percentage used for the deflating the exterior outline 1120 and for inflating the interior outline 1122 is same as the dilation increment used to dilate the drawing-entities (block 752 of FIG. 7B), but such is not strictly required. In words then, the dilation at the prior step is used to expand the drawing-entities (i.e., mostly drawing-entities showing exterior walls at this point) so that all the drawing-entities become contiguous, overlap, or otherwise “connect up.” The exterior outline 1120 and interior outline 1122 of the union shape 1116 are thus expanded and contracted representations, respectively, of the footprint of the outer walls of the floor. Deflating the exterior outline 1120 brings the exterior outline 1120 closer to the actual position of the outer walls, and likewise inflating the interior outline 1122 brings the interior outline 1122 closer to the actual position of the outer walls. Of the two outlines, the outline with the lowest number of vertices is selected.

Still referring to FIG. 11B, the middle drawing 1130 shows the example exterior outline 1120 after deflation and the interior outline 1122 after inflation. In accordance with example methods, either the exterior outline 1120 or the interior outline 1122 is selected as the candidate for the floor outline. Here, the exterior floor outline 1120 has fourteen vertices, while the interior outline 1122 has four vertices, and thus the interior outline 1122 is selected for further processing.

The lower drawing 1132 shows an opposite scenario. In particular, the lower drawing 1132 shows a situation in which the union shape 1134 has an interior outline 1136 having more vertices than the exterior outline 1138. It follows that after deflation and inflation of the exterior outline 1138 and the interior outline 1136, respectively, the reduced vertex solution will be the deflated exterior outline. The examples provided to this point have shown one outline (i.e., either the exterior or the interior) having four vertices; however, in practice both the exterior and interior outlines are likely to have many features resulting in many vertices, and thus the selected reduced vertex solution may not necessarily be selecting a square or rectangle.

Returning to FIG. 7B, with selected reduced vertex solution the example method may continue refining in increments until the reduced vertex solution meets the predetermined criteria 764. In example cases, the Hausdorff distance may be calculated between the reduced vertex solution and the floor outline found by the converged snake 722 (FIG. 7A). When the reduced vertex solution and the floor outline meet the predetermined criteria 764, the final reduced vertex solution becomes the final building outline 766. The specification now turns to furniture detection.

Furniture Detection

Returning briefly to FIG. 1 , the next example step in creating indoor maps from CAD drawings is furniture detection 106. The example furniture detection 106 follows the floor detection 104 to imply that furniture detection in example cases is performed on a floor-by-floor basis.

FIG. 12 shows, in block diagram form, the example furniture detection 106. In particular, the furniture detection 106 may be conceptually, though not necessarily physically, divided into furniture-level machine-learning algorithms 1200 and furniture post processing 1202. In example systems, the furniture-level machine-learning algorithms 1200 may be provided the floor-level bounding line (e.g., raster-image) from the floor detection 104, the CAD vector-image, and the text database. The furniture-level machine-learning algorithms 1200 may be any suitable set of machine algorithms, such as one or more convolution neural networks, trained with one or more respective sets of curated training data. In example systems, the furniture-level machine-learning algorithms 1200 may produce furniture bounding lines or bounding boxes and associated identity information for each piece of furniture identified by the floor-level bounding line. To the extent the CAD drawing shows multiple stories or floors, the furniture machine-learning algorithms may be instantiated multiple times, one each for each floor.

In example systems, each furniture bounding box may be a raster-image that indicates the location of a piece of furniture (e.g., desk, guest chair, conference table, door) on a floor. The furniture bounding box may not “tightly” show the exterior footprint of the piece of furniture. Rather, in some examples the furniture bounding box depicts a polygon (e.g., a square, rectangle) that fully encircles an identified furniture drawing-entity, even though the furniture drawing-entity may have a smaller and more complex exterior footprint. Stated otherwise, in the coordinate space of the CAD drawing, there may be non-zero offsets between the footprint of any particular furniture drawing-entity and an inside dimension of the furniture bounding box.

The furniture-level machine-learning algorithms 1200 are summarized here first, and then described in greater detail below. In summary, example methods utilize a plurality of machine-learning algorithms, and in one example three machine-learning algorithms. In particular, in one example method the floor-level bounding line and the CAD vector-image are applied to a furniture-level machine-learning algorithm. The example furniture-level machine-learning algorithm is designed and trained to produce furniture bounding boxes around each furniture drawing-entity on the floor identified by the floor-level bounding line. The floor-level machine-learning algorithm may also make, for each bounding box, a furniture class prediction (e.g., chair, desk, conference table, door, double door) based on the size and drawing-entities within each bounding box (and keeping in mind that text was removed before creating the CAD vector image). Further in example methods, a parsed text database may be applied to a text-level machine-learning algorithm. In particular, the text database (e.g., generated in the preprocessing 102 of FIG. 1 ) may be parsed in the sense that the text that has location information placing the text within the floor-level bounding line may be extracted and provided—the parsed text database. Alternatively, the text-level machine-learning algorithm may be designed and trained to take as input the entire text database and the floor-level bounding line, and parse therefrom the pertinent text (e.g., text that has location information placing the text within the floor-level bounding line). Regardless of precisely how the parsed text database is created, the text-level machine-learning algorithm is designed and trained to produce furniture identities with associated location information.

Thus, at this stage the furniture-level machine-learning algorithm has produced the furniture bounding boxes (and possibly furniture class prediction). The text-level machine-learning algorithm has produced furniture identities with associated location information. The output of each of the furniture-level machine-learning algorithm and the text-level machine-learning algorithm may be applied to third machine-learning algorithm, namely an ensemble machine-learning algorithm. The example ensemble machine-learning algorithm may be designed and trained to generate or select a set of final-furniture bounding boxes and associated identity information. The resultant may then be applied to the furniture post processing 1202.

FIG. 13 graphically shows an example of the furniture machine-learning algorithms. In particular, the upper-left drawing of the figure shows a partial rendering of a floor from a CAD drawing. The partial rendering includes a conference table and associated chairs on the left, a cubicle arrangement and associated chairs on the right, and several example doors. The partial rendering also includes text; however, the text is there for purposes of discussion regarding the parsed text database, and thus the text is not necessarily present in the computer file provided to the furniture-level machine-learning algorithm. As shown by dashed line 1300 the text is parsed to create parsed text database 1302. In the context of the example of FIG. 13 , the parsed text database includes the text “Meeting Tbl” and the cubicle designations (e.g., “Cub1”, “Cub2”) along with associated location information. The location information may include direct location coordinates within the coordinate space of the CAD drawings, or the location information may include associations with other drawing-entities. For example, the “Meeting Tbl” wording may be associated with the drawing-entity representing the meeting table. The parsed text database is applied to a text-level machine-learning algorithm 1304. The example text-level machine-learning algorithm 1304 is designed and trained to generate a set of furniture identities and associated location information (shown in the figure as class prediction text 1306).

Now considering the furniture-level machine-learning algorithm. In example cases, the furniture-level machine-learning algorithm 1308 is provided the floor-level bounding line (not specifically shown) and the CAD vector image (partially shown). The furniture-level machine-learning algorithm is designed and trained to generate furniture bounding boxes around each drawing-entity representative of furniture. In FIG. 13 , block 1310 graphically shows the resultant or output of the furniture-level machine-learning algorithm 1308. In particular, each furniture drawing-entity (including doors) has a bounding box associated therewith. For example, the double doors 1312 in the lower left are associated with the bounding line 1314. As yet another example, the desk chair 1316 associated with the upper-right cubicle is associated with the bounding box 1318.

In example methods, the resultants or outputs of the text-level machine-learning algorithm 1304 and the furniture-level machine-learning algorithm 1308 are both applied to a third machine-learning algorithm, the ensemble machine-learning algorithm 1320. As alluded to above, the ensemble machine-learning algorithm 1320 is designed and trained to generate and/or select final-furniture bounding boxes and identity information regarding the furniture within each bounding box. In example cases, and as shown in the figure, the ensemble machine-learning algorithm 1320 produces two classes of outputs: 1) a set of bounding boxes for doors and associated door identity information (e.g., single door swing left, single door swing right, double door, sliding door); and 2) furniture bounding boxes and associated identity information. As shown in FIG. 13 , the bounding boxes for doors (e.g., raster-images) and associated door identity information may be passed to the room detection post processing (discussed in greater detail below). The bounding boxes for the remaining furniture (e.g., raster-images) and associated identity information may be passed to the furniture post processing 1202.

Before turning to furniture post processing 1202, however, the specification turns to a gridding technique associated with the CAD drawings applied to the furniture-level machine-learning algorithm 1308. The scale of CAD drawings may vary significantly. For example, a CAD drawing of a relatively small office space having only two or three offices may be vastly different than the scale of a CAD drawing showing the office layout for an entire floor of a multiple-story building. The difference in scale may complicate detection by the furniture-level machine-learning algorithm. For example, if the furniture-level machine-learning algorithm is trained with training data having a different scale than a CAD drawing applied for analysis, the furniture-level machine-learning algorithm may be unable to correctly find and identify the furniture drawing-entities. Issues associated with the scale of the underlying training data and applied CAD drawings is addressed, in at least some cases, by gridding technique.

In particular, in preprocessing 102 (FIG. 1 ) the original CAD drawing is parsed to determine scale information 204 (FIG. 2 ). In example cases, the scale information 204 from the preprocessing 102 is used to, conceptually, divide the CAD vector-image into grids of predetermined size. More particularly, each floor (e.g., identified by floor-level bounding lines) is divided into a plurality of grids having predetermined size, the dividing based on the scale information. In example methods, each grid has a size of 25 square meters, but the grid size may be arbitrarily chosen at the discretion of the system designer. For reasons that will become clear based on the further discussion, dividing to create grids does not necessarily require separating the CAD vector-image into separate files each representing 25 square meter grids; rather, in example methods each grid is extracted or copied from CAD vector-image and supplied to the furniture-level machine-learning algorithm 1308. Thus, the furniture-level machine-learning algorithm 1308 may be instantiated multiple times, one each for each grid covering the floor identified by the floor-level bounding line.

Gridding has the positive consequence that the furniture-level machine-learning algorithm 1308, in being provided data of consistent scale, is more likely to correctly identify bounding boxes for furniture drawing-entities. However, non-overlapped gridding (i.e., each grid defines an area that is not duplicated in any adjacent grid) creates a difficulty in that some furniture drawing-entities may span two or more grids. Inasmuch as the furniture-level machine-learning algorithm 1308 may have difficulty identifying partial furniture drawing-entities, in example methods the grids are overlapped a predetermined amount (e.g., 5% of grid width, 10% of grid width) sufficient to address the divided furniture issue. In example cases, the overlap may be 2.5 meters, which in most cases is sufficient to ensure that a furniture entity partially shown on one grid will be fully shown on the adjacent grid. While gridding addresses the divided furniture issue, gridding also may create a duplicate furniture detection issue. Identifying duplicate furniture detections, and removing duplicate detections, takes place in furniture post processing 1202.

In summary, in the example furniture post processing 1202, the final-furniture bounding boxes created by the ensemble machine-learning algorithm are converted from raster-image form to CAD drawing form, and with overlapping bounding lines removed, the furniture bounding boxes are used in conjunction with the CAD vector image to create a set of filtered entities residing within each furniture bounding box. For directly recognized furniture drawing-entities (e.g., chair), the recognized drawing-entities may be replaced with predefined entities (e.g., drawing-entities showing a high-back chair replaced with a circle) for use on the indoor map. For filtered entities that are not directly identifiable (e.g., non-standard furniture items), the non-standard drawing-entities are reduced in complexity. Finally, the example furniture post processing may remove any duplicate entities created based the overlaps of the gridding.

FIG. 14 shows a flow diagram of an example furniture post processing 1202. In particular, the furniture post processing 1202 is provided the outputs of the furniture-level machine-learning algorithms 1200 (FIG. 12 ), in the example form of bounding boxes. The example furniture post processing 1202 may then convert the coordinate space of the bounding boxes (e.g., vector-images) into the coordinate space of the CAD drawings (e.g., DXF), as shown by process 1400. With the bounding boxes in the coordinate space of the CAD drawings, overlapping bounding boxes are deleted, leaving one bounding box in the formerly overlapping space, as shown by process 1402. Each of the remaining bounding boxes is inflated by a predetermined inflation increment, as shown by process 1404. The inflated boxes are then applied to the CAD vector-image 1406, and entities in the CAD vector-image that reside within the bounding boxes are filtered, as shown by process 1408. The resultant of the filtering may be multiple sets of remaining entities, each set of remaining entities being the drawing-entities that reside in the inflated bounding boxes. In other words, in the context of FIG. 14 , filtered entities should be read to refer to entities that remain after all the other drawing-entities, residing outside the inflated bounding boxes, are removed.

The example furniture post processing conceptually takes two parallel paths at this point based on the furniture drawing-entities that reside in each inflated bounding box. If a furniture drawing-entity within an inflated bounding box is recognized as a “standard” entity (e.g., chair, rectangular office desk), then the example method replaces the “standard” entity with a predefined shape for use within an indoor map (e.g., complex drawing of a chair replaced with an opaque circle), and the method proceeds directly to the final furniture polygon 1418 for that furniture drawing-entity. On the other hand, if a furniture drawing-entity within an inflated bounding box is a “non-standard” entity (e.g., odd-shaped conference table, or a desk with internal boxes showing power and data connections), then the example method continues as shown by FIG. 14 . In particular, the next step in the example method is creating polygons using the filtered entities, as shown by process 1410. That is, the filtered entities, prior to the process 1410, represent vector-image drawing-entities. The example process 1410 converts the vector-image entities into polygons (e.g., in CAD drawing format). The next step in the example method is deletion of small redundant polygons, as shown by process 1412. With the remaining polygons, the unary union is found, as shown by process 1414. Remaining polygons are deleted, as shown by process 1416, and the resultant is the final furniture polygon 1418 for that inflated bounding box. Though not specifically delineated in FIG. 14 , the example method is repeated for each inflated bounding box.

FIG. 15 graphically shows an example of a first portion of furniture post processing 1202. In particular, the upper-left drawing shows a rendering of two example bounding boxes. Bounding box 1500 encircles an example desk, and also encircles additional drawing-entities that make the drawing “non-standard.” By contrast, bounding box 1502 encircles an example chair in a “standard” form. The upper-left drawing also shows a desk extension or return 1504 in the example form of a circular return. Not shown in FIG. 15 is an example of overlapping bounding boxes, though FIG. 13 does show several examples (e.g., the bounding box 1318 for desk chair 1316 is fully overlapped by the bounding box for the cubicle desk (not specifically numbered)).

Referring initially to bounding box 1500, in example cases the bounding box is inflated by a predetermined inflation increment, with the resultant shown as inflated bounding box 1506. The inflated bounding box 1506 thus encircles the desk, the associated internal drawing-entities of the desk, and a connecting entity associated with the return 1504, but not the return 1504 itself. The drawing-entities within the inflated bounding box 1506 are kept, while the drawing-entities not contained within the inflated bounding box, in this example the return 1504, are deleted. The desk and associated internal drawing-entities of the desk are an example of a “non-standard” furniture entity, and thus the example method continues with filtering the entities and creation of polygons using the filtered entities (processes 1408 and 1410).

Still referring to FIG. 15 , the upper-right drawing shows the example filtered entities. From there, polygons are created from the filtered entities (process 1410) and the small polygons are deleted (process 1412), resulting in the rendering 1512. Next, the unary union is created and some union shapes may be deleted (process 1416). The unary union process, in this example, results in two entities: 1) the outline 1514 of the desk; and 2) the outline 1516 of the square with the internal “X.” In other words, in this example two union shapes exist, comprising an outer shape (i.e., the outline 1514) and the inner shape (i.e., outline 1516). In example methods, any union shape that resides within another union shape may be deleted, and the resultant is the outline 1514 of the desk as shown in the rendering 1518. Thus, the outline 1514 becomes the furniture polygon for the example desk used in the indoor map.

Returning to the upper-left drawing, and particularly the bounding box 1502. Again, in example cases the bounding box 1502 is inflated by the predetermined inflation increment, with the resultant being inflated bounding box 1520. The inflated bounding box 1520 encircles the chair. The drawing-entities within the inflated bounding box 1520 are kept. The chair is an example of a recognized “standard” furniture entity, and thus the example method skips the various steps of the example method (the skipping shown by line 1522) to replacing the chair drawing-entity 1530 with a predefined shape for use within an indoor map. For example, the chair drawing-entity 1530 may be replaced with an opaque circle or a polygon. Thus, the method proceeds directly to the final furniture polygon 1524 for that furniture drawing-entity.

A few points to consider regarding “standard” furniture drawing-entities before proceeding. As mentioned above, there are no universally accepted standards for furniture drawing-entities in CAD drawings. Nevertheless, there may be duplicate uses of drawing-entities within a CAD drawing (e.g., each floor may use the same “chair” drawing-entity), there may be duplicate uses by the same architect across different CAD drawings, and there may be duplicate uses based on many architects having access to the same predefined sets of furniture drawing-entities (akin to clipart). Thus, the furniture-level machine-learning algorithms may be able to detect with high confidence, based on the training data set as well as later incremental training with furniture post processing results, that a particular furniture drawing-entity is a known entity (e.g., chair, desk, door, water fountain). In those situations then, the floor post processing may skip the processes 1408 through 1416, and proceed directly to the replacing the known furniture drawing-entity with a reduced complexity drawing-entity, such as in FIG. 15 replacing the chair drawing-entity 1530 with final furniture polygon 1524 in the example form of an opaque circle.

Still considering furniture post processing. In order to address scale issues, in example cases the CAD drawings are divided into a plurality of grids having predetermined size. In example methods, each grid has a size of 25 square meters, and to address the divided furniture issue each grid may be overlapped a predetermined amount. While gridding addresses the divided furniture issue, gridding also may create a duplicate furniture detection issue. That is, the furniture-level machine-learning algorithms may detect the same piece of furniture in two adjacent grids because of the overlap. Thus, in accordance with example embodiments, another function of the furniture post processing is to remove duplicate furniture detection from the final furniture entities.

FIG. 16 graphically shows an example of a second portion of furniture post processing. In particular, FIG. 16 shows two grids—Grid 0 and Grid 1. In this example, Grid 0 shows a portion of the floor, and Grid 1 shows an overlapping portion that also includes the exterior wall 1600. In order to discuss duplicate furniture detection, Grid 0 delineates a zone 1602 that defines a portion of the overlapping region that resides within Grid 0. Similarly, Grid 1 delineates a zone 1604 that defines a portion of the overlapping region that resides within Grid 1. Below each of Grid 0 and Grid 1 are the respective zones of the overlapping regions shown in magnified form, and thus in greater detail. In example cases, the furniture post processing does not necessary create or establish the zones 1602 and 1604; rather, those zones are identified for purposes of explanation.

In the lower-left portion of FIG. 16 , zone 1602 of Grid 0 shows a duplicate detection area 1606. The duplicate detection area 1606 contains a plurality of desks and chairs. In the lower-right portion of FIG. 16 , zone 1604 of Grid 1 shows a duplicate detection area 1608. The duplicate detection area 1608 contains a plurality of desks and chairs that are duplicated in the detection area 1606. Here again, in example cases the furniture post processing does not necessary create or establish the duplicate detection areas 1606 and 1608; rather, those areas are identified for purposes of explanation. Thus, because of the gridding, and particularly the overlap of the gridding, some furniture drawing-entities will be detected in two or more grids. In the example of FIG. 16 , the furniture drawing-entities that reside the duplicate detection areas 1606 and 1608 may be detected by the furniture-level machine-learning algorithms to reside in both in the example Grid 0 and Grid 1. Thus, in example case an additional function of the furniture post processing is to identity and remove duplicate furniture entities from the final list of furniture entities.

Identifying and removing duplicate furniture entities from the final list of furniture entities may take any suitable form. For example, each furniture entity is associated with location information. The furniture post processing may thus analyze the furniture entities and respective location information from each grid, and based on two furniture entities having the same location, or being within a predetermined distance of each other given slight processing differences (e.g., within 5 centimeters (cm), within 10 cm), remove duplicate furniture detections or duplicate furniture entities from the final furniture entities. The final furniture entities (one set each for each detected floor) are passed to the room detection 108 (FIG. 1 ).

Room Detection

Returning briefly to FIG. 1 , the next example step in creating indoor maps from CAD drawings is room detection 108. The example room detection 108 follows the floor detection 104 to imply that room detection in example cases is performed on a floor-by-floor basis. The example room detection 108 also follows furniture detection 106 to imply room detection in example cases is performed using the detected furniture entities and associated location information.

FIG. 17 shows, in block diagram form, the example room detection 108. In particular, the room detection 108 may be conceptually, though not necessarily physically, divided into room-level machine-learning algorithms 1700 and room post processing 1702. In example systems, the room-level machine-learning algorithms 1700 may be provided the floor-level bounding line from the floor detection 104, the CAD vector-image, the furniture entities and associated location information from the furniture detection 106, and the text database. The room-level machine-learning algorithms 1700 may be any suitable set of machine algorithms, such as one or more convolution neural networks, trained with one or more respective sets of curated training data. In example systems, the room-level machine-learning algorithms 1700 may produce room bounding lines and associated identity information for each room identified on a floor. To the extent the CAD drawing shows multiple stories or floors, the room-level machine-learning algorithms may be instantiated multiple times, one each for each floor.

In example methods, each room bounding line may be a raster-image that indicates the location of a room on a floor. The room bounding line may not “tightly” show the exterior footprint of the room. Rather, in some examples the room bounding line depicts a polygon (e.g., a square, rectangle) that fully encircles an identified room, even though the room may have a more complex footprint. Stated otherwise, in the coordinate space of the CAD drawing, there may be non-zero offsets between the footprint of any particular room and an inside dimension of the room bounding line.

—Room-Level Machine Learning Algorithms

The room-level machine-learning algorithms 1700 are summarized here first, and then described in greater detail below. In summary, example methods utilize a plurality of machine-learning algorithms, and in one example three machine-learning algorithms. In particular, in one example method the floor-level bounding line and the CAD vector-image are applied to a room-level machine-learning algorithm. The example room-level machine-learning algorithm is designed and trained to produce room bounding lines around each room on the floor. The room-level machine-learning algorithm may also create, for each bounding line, a class probability distribution regarding identity of the room (e.g., office, conference room, water closet). Given that the text was removed from CAD drawing that formed the basis of the CAD vector-image, the class probability distributions created by the room-level machine-learning algorithm may be referred to as the graphics-based probability distributions.

Further in example methods, a parsed text database may be applied to a text-level machine-learning algorithm. In particular, the text database 214 (FIG. 2 ) may be parsed in the sense that the text that has location information placing the text on the floor (i.e., within the floor-level bounding line) may be extracted and provided—the parsed text database. Alternatively, the text-level machine-learning algorithm may be designed and trained to take as input the entire text database 214 and the floor-level bounding line, and parse therefrom the pertinent text (e.g., text that has location information placing the text within the floor-level bounding line). Regardless of precisely how the parsed text database is created, the text-level machine-learning algorithm is designed and trained to produce a plurality of text-based probably distributions regarding room identities.

Thus, at this stage the room-level machine-learning algorithm produced the room bounding lines and graphics-based probably distributions. The text-level machine-learning algorithm produced text-based probability distributions regarding room identities. The output of the room-level machine-learning algorithm and the output of the text-level machine-learning algorithm, along with the furniture entities and associated location information (from the furniture detection 106 (FIG. 1 )), may be applied to third machine-learning algorithm, namely an ensemble machine-learning algorithm. The example ensemble machine-learning algorithm may be designed and trained to generate or select a plurality of final room identities associated one each with each room bounding line. The resultant may then be applied to the room post processing 1702.

FIG. 18 graphically shows an example of the room-level machine-learning algorithms. In particular, the upper left drawing of the figure shows a partial rendering of a floor from a CAD drawing. The partial rendering includes various rooms and text; however, the text is shown for purposes of discussion regarding the parsed text database, and thus the text is not necessarily present in the CAD vector-image provided to the room-level machine-learning algorithm. As implied by dashed line 1800, the text is parsed to create parsed text database 1802. In the context of the example of FIG. 18 , the parsed text database includes all the text shown (e.g., “Meeting Room 1”, “Meeting Room 2”, “Staff”) along with associated location information. The location information may include direct location coordinates within the coordinate space of the CAD vector-image, or the location information may include associations with other drawing-entities. For example, the “Meeting Room 1” wording may be associated with the drawing-entity being one of the walls of the meeting room. The parsed text database is applied to text-level machine learning algorithm 1804. The example text-level machine-learning algorithm 1804 is designed and trained to generate a set of text-based probability distributions (shown in the figure as class probability distribution 1806). That is, each text-based probability distribution may comprise a set of possible room identities, with each member of the set of possible room identities associated with a probability that member represents the correct identity. For example, considering the room associated with the text “Meeting Room 1”, the text-based probability distribution may assign a relatively high probability to the room being a conference room (e.g., greater than 0.90), and relatively low probability to the room being a water closest (e.g., less than 0.10).

Now considering the room-level machine-learning algorithm. In example cases, the room-level machine-learning algorithm 1808 is provided the floor-level bounding line (not specifically shown) and the CAD vector-image 1821 (not including the text). The room-level machine-learning algorithm 1808 is designed and trained to generate room bounding lines around each room depicted on the floor identified by the floor-level bounding line. In FIG. 18 , block 1810 graphically shows the resultant or output of the room-level machine-learning algorithm 1808. In particular, each room has a bounding line associated therewith. For example, the room shown as “Meeting Room 1” in the upper rendering has a bounding line 1812 associated therewith. As yet another example, the room shown as “Staff” in the upper rendering has a bounding line 1814 associated therewith.

In example methods, the resultant of the room-level machine-learning algorithm 1808 produces not only a plurality of room bounding lines, one each for each room, but also produces a plurality of graphics-based probability distributions, one each for each room bounding line. FIG. 18 graphically illustrates one matched set of a bounding line 1820 and corresponding graphics-based probability distribution 1822. Again, however, the output or resultant from the room-level machine-learning algorithm 1808 is a plurality of room bounding lines and respective plurality of graphics-based probability distributions.

In example methods, the resultants or outputs of the text-level machine-learning algorithm 1804 and the room-level machine-learning algorithm 1808 are applied, along with the furniture detection output 1826 (i.e., the furniture entities and associated location information from the furniture detection 106 (FIG. 1 )), to a third machine-learning algorithm, the ensemble machine-learning algorithm 1830. In example cases, the ensemble machine-learning algorithm 1830 is a gradient boosting algorithm, such as the LightGBM gradient boosting framework available from Microsoft Corporation. As alluded to above, the ensemble machine-learning algorithm 1830 is designed and trained to generate final room identity for each room bounding line (shown as class prediction 1832 in the figure). The final room identities, along the room bounding lines (e.g., room bounding line 1820) are then applied to the room post processing 1702.

—Room Post Processing

The specification now turns to room post processing 1702. In example methods, the resultants from the room-level machine-learning algorithms 1700 are applied in parallel to various post processing algorithms. More particularly still, in example methods the resultants from the room-level machine-learning algorithms 1700 are applied to: 1) entity-based post processing algorithms; 2) graph-based post processing algorithms; and 3) generative adversarial network (GAN) post processing algorithms. Each of the example three post processing algorithms may be particularly suited for finding final room outlines, each in their own particular situation. The example entity-based post processing algorithm generates a set of entity-based bounding lines, one entity-based bounding line for each room on the floor. The example graph-based post processing algorithm generates a set of graph-based bounding lines, one graph-based bounding line for each room on the floor. The example GAN-based post processing algorithm generates a set of GAN-based bounding lines, one GAN-based bounding line for each room on the floor.

The resultants from the example three post processing algorithms are then applied to a rule-based evaluator that selects, for each room and from all the bounding lines generated with respect to the room, a ruled-based selection. The resultants from the example three post processing algorithms are also applied to a selection machine-learning algorithm that selects, for each room and from all the bounding lines generated with respect to the room, a ML-based selection. At this stage then, each room on the floor is associated with a rule-based selection of the room outline and a ML-based selection of the room outline. For each room, the two room outlines (i.e., the rule-based selection and the ML-based selection) are applied to a room decisions engine that selects between the two, resulting in a final room outline. The final room outline may then be the basis for further processing to identify or extract the walls for each room. Finally, the extracted walls for each room on the floor are merged to create the indoor map.

FIG. 19 shows a flow diagram of the example room post processing 1702. In particular, the resultants from the room-level machine-learning algorithms 1700 are applied to entity-based post processing 1900 algorithms, graph-based post processing 1902 algorithms, and GAN-based post processing 1904 algorithms. The resultants from the example three post processing 1900, 1902, and 1904 are then applied in parallel to a rule-based evaluator 1906 and a selection machine-learning algorithm (shown in the flow diagram as a ML-Based Evaluator 1908, and hereafter selection machine-learning algorithm 1908). As between the respective selections of the rule-based evaluator 1906 and the selection machine-learning algorithm 1908, a room decision engine 1920 selects a final room outline based on the CAD vector-image and the text database. The final room outlines are then used to as the basis for wall extraction 1922. The final room outlines, and extracted walls, are then merged (process 1924) to create the indoor map for the floor. Each illustrative step is addressed in turn.

—Entity-Based Post Processing Algorithms

FIGS. 20A and 20B show a flow diagram of the entity-based post processing algorithm of the room post processing 1702. Referring initially to FIG. 20A, the entity-based post processing algorithm of the room post processing 1702 can be conceptually divided into drawing-entity selection 2000 and merging close lines 2002. Referring to FIG. 20B, the entity-based post processing algorithm can be further conceptually divided into finding polygons 2004. Each will be addressed in turn.

—Drawing Entity Selection—Entity Based

Referring again to FIG. 20A. The example drawing-entity selection 2000 is provided the outputs of the room-level machine-learning algorithms 1700 (FIG. 17 ), in the example form of room bounding lines. The example drawing-entity selection 2000 may then convert the coordinate space of the bounding lines (e.g., vector-images) into the coordinate space of the CAD drawings (e.g., DXF), as shown by process 2006. With the bounding lines in the coordinate space of the CAD drawings, each of the room bounding lines is inflated to create an inflated bounding line and deflated to create a deflated bounding line, the inflation and deflation as shown by process 2008. The area between the inflated bounding line and the deflated bounding line defines an entity patch. The inflated and deflated bounding lines are then applied to the CAD vector-image 2010, and entities in the CAD vector-image that reside within the entity patch are filtered or extracted for further processing, the extraction as shown by process 2012. All the drawing-entities within the entity segmentation patch are identified, and small lines (e.g., line segments with lengths below a predetermined length) within the entity patch are removed or deleted, as shown by process 2014. The resultant may be multiple sets of remaining drawing-entities, each set of remaining drawing-entities being the drawing-entities that reside in the respective entity patches. The method then proceeds to merging close lines 2002.

—Merging Close Lines

Still referring to FIG. 20A, the next step in the example method is merging of close lines 2002. In particular, for each entity patch, the slope of the drawing-entities (e.g., mostly, if not exclusively at this stage, line segments) are calculated, as shown by process 2016. The drawing-entities are then grouped with respect to their slopes, as shown by process 2018. In example cases, the grouping takes place in five degree increments. For example: lines that have a slope between −2.5 degrees and +2.5 degrees are grouped; lines that have a slope between +2.5 degrees and +7.5 degrees are grouped; and so on. The resultant is a plurality of groups of drawing-entities, with the members of each group having similar slopes. For each group (process 2020), drawing-entities are merged if distance and overlap criteria are satisfied, as shown by process 2022. A determination 2024 is made as to whether further groups are to be processed. If so, the example method retreats to processing the next group (processes 2020 and 2022). If all the groups are processed, the example method moves to finding polygons 2004

—Finding Polygons

Referring to FIG. 20B. The next steps in the example method are the steps summarized as finding polygons 2004. The example method takes as input the room bounding lines from the room-level machine-learning algorithms 1700 and the cleaned-up entities 2030 from the immediately previous merging of close lines 2002. Starting with the room bounding lines, once again each of the room bounding lines is inflated to create an inflated bounding line and deflated to create a deflated bounding line, the inflation and deflation as shown by process 2032. The area between the inflated bounding line and the deflated bounding line defines a polygon patch. The inflated and deflated bounding lines are applied to the cleaned-up entities 2030, and drawing-entities of the cleaned-up entities that reside within the polygon patch are filtered or extracted for further processing, as shown by process 2034. The polygon patch associated with finding polygons 2004 is smaller or defines less area than the entity patch associated with the drawing-entity selection 2000, further focusing on finding the actual room outline.

In summary, the example method removes from the polygon patch: spanned entities whose size is below a predetermined size; duplicate entities; and extra vertices. For the drawing-entities remaining in each polygon patch, the example method: dilates the remaining entities; performs a unary union of the dilated entities to create a union shape; and attempts to find closed-loop path within the union shape. When a closed loop is found, the example method determines an internal and external outline of the union shape, deflates the exterior outline, and inflates in interior outline, as discussed with respect finding the floor-level outlines. The example method selects either the deflated external outline or the inflated internal outline, in example methods the selection based on which outline has the lowest number of vertices. From there, various further simplifications are performed to arrive a final room outline passed to the further processing, and the method continues for each room bounding line.

More precisely then, the example method deletes short spanned entities, extra vertices, and duplicate entities, as shown by process 2036. The remaining drawing-entities are dilated with a given dilation increment, as shown by process 2038. Thereafter, a unary union of the dilated entities is calculated, as shown by process 2040, to create a unary entity or union shape. A determination 2042 is made as to whether the union shape defines a closed-loop path. If no closed-loop path is found, this means the dilation was insufficient to make contiguous or “connect up” the drawing-entities, and the example method takes the “No” path out of the determination 2042. Along the “No” path, the dilation increment is increased, and the dilation, calculation of the unary union, and closed-loop determination are repeated until a closed-loop path is found.

With the closed-loop path found (i.e., the “Yes” path out of determination 2042), an exterior and interior fit is performed, as shown by process 2044. In particular, in example methods the exterior and interior fit process 2044 involves extracting interior and exterior outlines or polygons of the union shape created by process 2040. The exterior and interior polygons may be found using any suitable method, such as a converging active contour model or an expanding active contour model. The exterior polygon is deflated to create a deflated exterior polygon, while the interior polygon is inflated to create an inflated interior polygon, and from the deflated exterior polygon and the inflated interior polygon a minimum or reduced vertex solution is selected, as shown by determination 2046. From there, the reduced vertex solution may be the final room outline for the room under consideration, as implied by process 2052. If there are further rooms to process, determination 2054, the example method retreats to processing the further rooms, otherwise the results are passed to the next stage of room post processing (e.g., rule-based evaluator 1906 and selection machine-learning algorithm 1908 (both FIG. 19 )).

FIG. 21A graphically shows an example of entity-based room post processing. In particular, consider that upper drawing 2100 represents an example room bounding line 2102 of a room on the floor, the room bounding line 2102 as found by the example steps of FIG. 18 . Further, consider that the middle drawing 2104 is a portion of the modified CAD drawing showing a room on a floor along with various extraneous drawing-entities. In accordance with example methods, the room bounding line 2102 may be overlaid on the middle drawing 2104 as shown by the lower drawing 2106. In some examples, the overlaying may be performed with both the room bounding line 2102 and CAD drawing in a CAD drawing format, but combining in other file formats, including mixed formats, is possible.

FIG. 21B graphically shows the entity-based post processing of the example method, continuing from FIG. 21A. As shown by upper drawing 2110, the room bounding line (not specifically shown) may be inflated to create an inflated bounding line 2112, and the room bounding line may be deflated to create the deflated bounding line 2114. The inflation and deflation of FIG. 21B are exaggerated for purposes of clarity, but may be about +/−5% to 10% of the wall lengths. Moreover, the inflated bounding line 2112 and the deflated bounding line 2114 create a zone or area between them (i.e., the entity patch 2116).

The inflated bounding line 2112 and deflated bounding line 2114 delineate several categories of drawing-entities. For example, lines 2118 and 2120 cross the inflated bounding line 2112. Within the entity patch 2116 resides various drawing-entities, such as outer walls of the room (e.g., walls 2122 and 2124), short spanned entities 2126, and duplicate entity 2128 (i.e., a duplicate wall line). In practice, the duplicate entity 2128 may be hidden by being directly “behind” a line or set of lines showing the wall at that location, but duplicate entity 2128 is offset for clarity of the drawing. Inside the deflated bounding line 2114 resides various drawing-entities, likely defining furniture within the room. In the example method, the drawing-entities that reside wholly outside the inflated bounding line 2112 (none specifically shown), and portions of drawing-entities that cross the inflated bounding line 2112, such as portions of the lines 2118 that cross the inflated bounding line 2112, may be extracted or removed. Moreover, drawing-entities that reside wholly inside the deflated bounding line 2114 may be extracted or removed. For example, all the drawing-entities representing furniture within the room, may be removed.

Still referring to FIG. 21B, the lower drawing 2130 shows the remaining drawing-entities after having various entities outside the inflated bounding line 2112 removed, and having the various entities inside the deflated bounding line 2114 removed. Thus, the lower drawing 2130 shows a set of entities that may be passed to the next step in the example method.

FIG. 22A graphically shows an example of merging close lines. In particular, the upper-left drawing shows the remaining entities from the previous processing, including the various walls (e.g., walls 2122 and 2124), the short spanned entities 2126, and the duplicate entity 2128. The upper-left drawing also shows several groups of lines, with the grouping based on their respective slopes (and initial proximity). For example, the upper-left drawing shows groups 2200, 2202, 2204, 2206, 2208, and 2210. For each group, the drawing-entities are merged if distance and overlap criteria are met. Graphical examples of the distance and overlap criteria are shown in the lower box 2212. In particular, in example cases grouped drawing-entities are merged if two criteria are met: 1) a distance criteria; and 2) and overlap criteria. More particularly still, grouped drawing-entities are merged if the distance between the drawing-entities is less than a predetermined distance, and the overlap of the grouped drawing-entities meet a predetermined overlap criteria. The left figure within lower box 2212 graphically shows an example situation in which two lines are not merged for having too great a distance between them. The middle figure within the lower box 2212 graphically shows an example situation in which two lines are not merged for having too little overlap. The right figure within the lower box 2212 graphically shows an example situation in which two lines meet both the distance criteria and the overlap criteria, and thus the two lines are merged into a single merged entity. Within the lower box 2212 the distance and overlap are exaggerated for purposes of discussion. In practice, the distance criteria may be about 20 centimeters. Likewise in practice, the overlap criteria may be as little as 10%.

The upper-right drawing of FIG. 22A shows a set of remaining drawing-entities after the merging of drawing-entities based on the distance and overlap criteria. Notice how the groups containing parallel lines (e.g., likely defining two sides of the same wall) are merged to form single lines defining walls. Notice also, however, how the short spanned entities 2126 and the duplicate entity 2128 remain. The upper-right drawing of FIG. 22A thus represents cleaned-up entities 2030.

FIG. 22B graphically shows merging close lines, continuing from FIG. 22A. So as not to unduly lengthen the specification, not specifically shown in the graphical representations are the pre- and post-versions of deletion of the short spanned entities 2126, duplicate entities 2128, and extra vertices. Thus, the upper-left drawing 2220 shows a set of remaining drawing-entities. In some cases, the upper-left drawing 2220 may be represented and be operated on in a vector-image format, but the operations may be performed in any suitable file format (e.g., CAD drawing format). In example methods, the various lines are dilated with a dilation increment, and a resultant is shown as the upper-middle drawing 2222. The upper-middle drawing 2222 shows a case in which the dilation increment is sufficient to have all the lines become contiguous, overlap, or “connect up.” The next step in the example method is to perform a unary union or unioning operation, which combines all the dilated entities into a single polyline or union shape, as shown by upper-right drawing 2224 comprising union shape 2226.

In the example method, the interior and exterior outlines or polygons of the union shape 2226 are extracted, as shown by the middle-left drawing 2228. The resultant interior and exterior outlines are shown as the middle drawing 2230. That is, the middle-left drawing 2228 shows the union shape 1116, along with an exterior outline 2232 and an interior outline 2234. Finding the exterior outline 2232 and interior outline 2234 may take any suitable form. For example, the union shape 2226 may be in, or converted to, a raster-image. A shrinking active contour model may be initialized outside the union shape 2226, and thus may be used to find the exterior outline 2232. An expanding active contour model may initialized within the union shape 2226, and thus may be used to find the interior outline 2234. In any event, the exterior outline 2232 and the interior outline 2234 are determined.

Still referring to FIG. 22B, in the example method the exterior outline 2232 is deflated by a predetermined percentage and the interior outline 2234 is inflated by the predetermined percentage, and a minimum or reduced vertex solution is determined as between the two. In some example cases, the predetermined percentage used for the deflating the exterior outline 2232 and for inflating the interior outline 2234 is same as the dilation increment used to dilate the drawing-entities, but such is not strictly required. In words then, the dilation at the prior step is used to expand the drawing-entities (i.e., mostly drawing-entities showing room walls at this point) so that all the drawing-entities become contiguous, overlap, or otherwise “connect up.” The exterior outline 2232 and interior outline 2234 of the union shape 2226 are thus expanded and contracted representations, respectively, of the footprint of the outer walls of the room. Deflating the exterior outline 2232 brings the exterior outline 2232 closer to the actual position of the walls of the room, and likewise inflating the interior outline 2234 brings the interior outline 2234 closer to the actual position of the walls of the room. Of the two outlines, the outline with the minimum or reduced number of vertices is selected.

Drawing 2240 shows the example exterior outline 2232 after deflation, and drawing 2242 shows the example interior outline 2234 after inflation. In accordance with example methods, either the exterior outline 2232 or the interior outline 2234 is selected as the candidate for the room outline. Here, the exterior floor outline 2232 has more vertices than the interior outline 2234, and thus the interior outline 2234 is selected as the entity-based room outline 2250 for further processing. The specification now turns to the graph-based post processing 1902 (FIG. 19 ).

—Graph-Based Machine Post Processing

Returning briefly to FIG. 19 . Another room post processing step in the example method is the graph-based post processing 1902. As implied by FIG. 19 , the graph-based post processing 1902 takes as input the room-level bounding line from the room-level machine-learning algorithms 1700 (FIG. 17 ). The graph-based post processing 1902 generates a graph-based bounding line for the room under consideration. FIG. 19 shows the processing with respect to one room-level bounding line. The example method may be repeated for each room-level bounding line provided by the room-level machine-learning algorithms 1700.

FIG. 23 shows a flow diagram of the example graph-based post processing. The graph-based post processing 1902 can be conceptually divided into drawing-entity selection 2300, graph conversion 2302, parallel line elimination 2304, and extending line segments 2306. Each will be addressed in turn.

—Drawing Entity Selection—Graph Based

The example drawing-entity selection 2300 is provided the outputs of the room-level machine-learning algorithms 1700 (FIG. 17 ), in the example form of room bounding lines. The example drawing-entity selection 2300 may then convert the coordinate space of the bounding lines (e.g., vector-images) into the coordinate space of the CAD drawings (e.g., DXF), as shown by the process. With the bounding lines in the coordinate space of the CAD drawings, each room bounding line is inflated to create an inflated bounding line and deflated to create a deflated bounding line, the inflation and deflation as shown by process 2308. The area between the inflated bounding line and the deflated bounding line defines a graph patch. The inflated and deflated bounding lines are then applied to the CAD vector-image 2310, and entities in the CAD vector-image that reside within the graph patch are filtered or extracted for further processing, the extraction as shown by process 2312. The resultant may be multiple a set of remaining drawing-entities that reside in the graph patch. The method then proceeds to graph conversion 2302.

—Graph Conversion

Still referring to FIG. 23 , the example graph conversion 2302 receives a set of remaining entities from the drawing-entity selection 2300 process. In example cases, the set of drawing-entities passed to the graph conversion 2302 are drawing-entities in the vector-image format, and most if not all the drawing-entities depict lines. For example, a line in the vector-image format may be defined by a plurality of polygons (e.g., triangles) stacked or abutting each other in such a way as to as to form, in the aggregate, the line. It follows that the end points of each line are not defined directly. Thus, the example method creates vertices, end nodes, or just nodes at the end of each line depicted in the set of drawing-entities, and as shown by processes 2314. From the nodes, line segments are created between corresponding nodes, as shown by process 2316. The resultant of the example process is a set of remaining drawing-entities comprising lines segments defined by end nodes in a two- or three-dimensional drawing space.

—Parallel Line Elimination

In example cases, the set of line segments created by the graph conversion 2302 is passed to the parallel line elimination 2304 process. In particular, the slope of the line segments in the graph patch are calculated, as shown by process 2318. The drawing-entities within each graph patch are then grouped with respect to their slopes, as shown by process 2320. Much like the grouping with respect to slope discussed in reference to FIG. 20A, in example cases the grouping takes place in five degree increments. The resultant is a plurality of groups of drawing-entities (e.g., line segments), with the members of each group having similar slopes. For each group, the example method comprises selecting an outer drawing-entity closest to the room-level bounding line, as shown by process 2322. The resultant is a set of outer line segments.

—Extending Line Segments

Still referring to FIG. 23 , the next step in the example method is the extending line segments 2306 process. In particular, each outer line segment is extended to meet or intersect the room-level bounding line on each end of the line, as shown by process 2330. Because each line segment of the set of line segments is extended, it follows that each line segment will likely, at least after extension (if not before), intersect other line segments. The next step in the example method is identifying or adding a plurality of nodes, vertices, or intersections one each at each location where line segments intersect, as shown by process 2332. Further line segments are then added or identified between the newly created intersections, as shown by process 2334. In some cases the further line segments are newly added and the other line segments (e.g., those extended) are deleted or removed. In other cases, the further line segments are portions of the line segments between intersections, and portions of the line segments outside the intersections are removed. Regardless of the precise mechanism of arriving at the further line segments, in some, but not necessarily all, cases the further line segments create a closed-loop path 2336 that should closely match the actual room outline. Stated otherwise, the simplified polygon defined by the closed-loop path 2336 is the final room outline for the room under consideration. The closed-loop path 2336 or final room outline is passed to the next stage of room post processing (e.g., rule-based evaluator 1906 and selection machine-learning algorithm 1908 (both FIG. 19 )).

The specification now turns to a graphical explanation of the example graph-based room post processing 1902. In order not to unduly lengthen the specification, the drawing-entity selection 2300, which utilizes the inflation and deflation of the room-level bounding line procedure with respect to the graph-based room post processing, is not specifically shown. Several prior discussions in this specification graphically show several example processes in which a room-level bounding line is inflated and deflated to create a patch, and where entities within the patch are kept and entities outside the patch are discarded or removed from further consideration with the respect that particular process (e.g., FIGS. 21A and 21B).

FIG. 24 graphically shows an example of graph-based room post processing. In particular, consider that the upper-left drawing 2400 shows a set of drawing-entities that resided in the graph patch defined by inflating and deflating the room-level bounding line. In the example method, nodes are created at the ends of each line, as shown in drawing 2402, such as nodes 2404 and 2406 associated with example line segment 2408. Once the nodes are found, line segments are added between the nodes, but that step is not separately shown in FIG. 24 . Drawing 2410 shows an example of grouping of lines according to slope (and a proximity criterion). In particular, drawing 2410 shows four example groups 2412, 2414, 2416, and 2418. For each group, the example method comprises selecting an outer drawing-entity closest to the room-level bounding line, the bounding line illustratively shown as room-level bounding line 2420 encircling the drawing 2410. Drawing 2422 shows a resulting set of outer line segments after the selection of line segments closest to the room-level bounding line 2420 and removal of the remaining drawing-entities.

The next step in the example method is the extending line segments. Still referring to FIG. 24 , each outer line segment is extended to meet or intersect the room-level bounding line 2420 on each end of the line, as shown by lower-left drawing 2430. For example, line segment 2408 is extended to cross the room-level bounding line 2420 at location 2432 and 2434. Because each line segment of the set of line segments is extended, each extended line segment intersects other line segments, whether in the original or extended length. The next step in the example method is adding intersections, one each at each location where line segments intersect, as shown by drawing 2440. In this particular example, four intersections are created, being intersections 2442, 2444, 2446, and 2448. Further line segments are then added between the newly created intersections, but that step not separately shown in FIG. 24 . In the example of FIG. 24 , a closed-loop path is formed or defined by the further line segments between the intersections. Thus, the closed-loop path is the final graph-based room outline 2450 for the room under consideration, as shown by drawing 2452. The graph-based room outline 2450 is passed to the next stage of room post processing (e.g., rule-based evaluator 1906 and selection machine-learning algorithm 1908 (both FIG. 19 )). The specification now turns to the GAN-based post processing.

—GAN-Based Post Processing

Returning briefly to FIG. 19 . Another room post processing step in the example method is the GAN-based post processing 1904. As implied by FIG. 19 , the GAN-based post processing 1904 takes as input the room-level bounding line from the room-level machine-learning algorithms 1700 (FIG. 17 ). The GAN-based post processing 1904 generates a GAN-based bounding line for the room under consideration. FIG. 19 shows the processing with respect to one room-level bounding line provided by the room-level machine-learning algorithms 1700; however, the example method may be repeated for each room-level bounding line provided by the room-level machine-learning algorithms 1700.

FIGS. 25A and 25B show a flow diagram of the example GAN-based post processing. The GAN-based post processing can be conceptually divided into dataset creation 2500 as shown in FIG. 25A, and GAN-processing as shown in FIG. 25B. Each will be addressed in turn.

In example methods, the GAN-based post processing 1904 starts with dataset creation 2500. The example GAN-based post processing 1904 is provided the CAD raster-image 2502 (e.g., CAD raster-image 222 of FIG. 2 ) as well as the room-level bounding line 2504 from the room-level machine-learning algorithms 1700 (FIG. 17 ), the room-level bounding line also in the example form of a raster-image. The CAD raster-image 2502 is cropped using the room-level bounding line, as shown by process 2506, to create a cropped image. More particularly still, though not specifically shown in the flow diagram of FIG. 25A, the room-level bounding line is converted to the coordinate space of the CAD drawings (e.g., DXF). With the room-level bounding line in the coordinate space of the CAD drawings, the room-level bounding line is used to crop the CAD raster-image (also or already in the coordinate space of the CAD drawing) to create the cropped image. The cropped image may then be padded and rescaled (while preserving aspect ratio) to a predetermined image size (e.g., 256×256 pixels), one for each image color of the CAD raster-image (e.g., red, green, blue), hence the reference to “256×256×3” and as shown by process 2508. Moreover, the room-level bounding line 2504 from the room-level machine-learning algorithms may also be padded and rescaled (while preserving aspect ratio) to a predetermined image size (e.g., 256×256 pixels), as shown by process 2510.

Turning now to FIG. 25B, the GAN-processing in example methods implements two GANs, an RGB GAN 2520 and a grayscale GAN 2522. As the name implies, the example RGB GAN 2520 is designed and trained to operate on the cropped image of the CAD raster-image, which may be a color image (e.g. red, green, and blue). The RGB GAN 2520 may perform a series of two-dimensional (2D) convolutions as part of a down-sampling procedure, as shown by process 2524. With the resultants of the down sampling the example method may perform a series of linear up-sampling operations, as shown by process 2526. The example RGB GAN 2520 may create a plurality of intermediate bounding lines (e.g., three intermediate bounding lines). Each of the intermediate bounding lines may be considered a proposal, by the RGB GAN 2520, regarding the outline of the room at issue.

Similarly, and again as the name implies, the example grayscale GAN 2522 is designed and trained to operate on the room-level bounding line in the form of a grayscale raster-image. The example grayscale GAN 2522 may perform a series of 2D convolutions as part of a down-sampling procedure, as shown by process 2528. With the resultants from the down sampling, the example method may perform a series of linear up-sampling operations, as shown by process 2530. The example grayscale GAN 2522 may create a plurality of intermediate bounding lines (e.g., three intermediate bounding lines). Each of the plurality of intermediate bounding lines may also be considered a proposal, by the grayscale GAN 2522, regarding the outline of the room at issue.

Still referring to FIG. 25B, the next step in the example method is linear up sampling, as shown by process 2532, with the resultant being multiple mask proposals 2534 (e.g., multiple raster-images showing proposed bounding lines for the room at issue). The multiple mask proposals are concatenated, as shown by process 2536, resulting in a set of mask proposals comprising members provided by each of the RGB GAN 2520 and the grayscale GAN 2522. The members of the set of mask proposals are subject to 2D convolution, as shown by process 2538, resulting in final bounding line 2540 (e.g., black and white or grayscale raster-image) having the predetermined size (e.g., 256×256 pixels). The final bounding line, being the GAN-based bounding line, is passed to the next stage of room post processing (e.g., rule-based evaluator 1906 and selection machine-learning algorithm 1908 (both FIG. 19 )).

FIG. 26 graphically shows an example of GAN-based post processing 1904. In particular, the upper-left drawing 2600 shows a portion of a rendering of a CAD vector-image showing several rooms on a floor. Dashed box 2602 shows a room under consideration, with the understanding that eventually most if not all the rooms will be subject to room detection, including the GAN-based room post processing. The upper-middle drawing 2604 shows an example of the cropped image. The cropped image of the upper-middle drawing 2604 is shown in grayscale, but again in practice the cropped image may be a color image. The upper-right drawing 2608 shows a room-level bounding line 2610 in the form of inside area or inside surface 2612 of the black region, with the outer edges of the black region representing the padded region to fit the predetermined size (e.g., 256×256 pixels). The patch between the inside surface 2612 and the outer edges is filled in to make the room-level bounding line 2610 more clear in the context of the images of predetermined size.

In example methods, the upper-middle drawing 2604 is applied to the RGB GAN 2520 while the room-level bounding line 2610 is applied to the grayscale GAN 2522. The result, after upscaling and concatenation, is a set of mask proposals, as shown by the lower-left drawing 2620. The members of the set of mask proposals are subject to 2D convolution, resulting in a final bounding line, being the GAN-based bounding line 2622. The GAN-based bounding line 2622, and particularly the inside surface, is the GAN-based post processing's proposal for the actual room outline; however, additional rule-based and machine-learning evaluators select from among the bounding lines from graph-based post processing, the entity-based post processing, and the GAN-based post processing to arrive at the room outline.

—Rule-Based and Ml-Based Evaluators

Returning to FIG. 19 , and summarizing before continuing. The entity-based post processing 1900 generates an entity-based bounding line, the graph-based post processing 1902 generates a graph-based bounding line, and the GAN-based post processing 1904 generates a GAN-based bounding line. The three bounding lines are then applied to both the rule-based evaluator 1906 and the selection machine-learning algorithm 1908.

The example rule-based evaluator 1906 receives as input the three bounding lines—the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line. The rule-based evaluator 1906 is designed and constructed to choose among the three using any suitable method. For example, in some cases each of the entity-based post processing 1900, the graph-based post processing 1902, and the GAN-based post processing 1904 generate a respective confidence factor (e.g., value between 0.0 (i.e., no confidence) and 1.0 (complete confidence)) regarding their respective bounding lines. In one example case, the rule-based evaluator 1906 may thus select a bounding line based, at least in part, by choosing the bounding line with the highest confidence factor. Regardless of the precise method, the rule-based evaluator 1906 produces a rule-based selection being a bounding line that the rule-based evaluator 1906 considers to be the bounding line closest to the actual room outline of the room under consideration. In some cases, the rule-based evaluator 1906 also produces a rule-based confidence factor, indicating a confidence of the rule-based evaluator 1906 that the rule-based selection matches the actual room outline of the room under consideration.

The example selection machine-learning algorithm 1908 also receives as input the three bounding lines—the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line. The selection machine-learning algorithm 1908 may be machine-learning algorithm (e.g., convolution neural network) designed and trained to choose among the three bounding lines. For example, in some cases each of the entity-based post processing 1900, the graph-based post processing 1902, and the GAN-based post processing 1904 generate a respective confidence factor regarding their produced bounding lines. In one example case, the selection machine-learning algorithm 1908 may thus select a bounding line based, at least in part, on the confidence factors and any other suitable criteria. Regardless of the precise method, the selection machine-learning algorithm 1908 produces a ML-based selection being a bounding line that the selection machine-learning algorithm 1908 considers to be the bounding line that closest to the actual room outline of the room under consideration. In some cases, the selection machine-learning algorithm 1908 also produces a ML-based confidence factor, indicating a confidence of the selection machine-learning algorithm 1908 that the selection machine-learning algorithm matches the actual room outline of the room under consideration.

—Room Decision Engine

Still referring to FIG. 19 , the next step in the example method is selection of the room outline by the room decision engine 1920. In particular, in example cases the room decision engine 1920 receives as input: the rule-based selection for the room outline (and in some cases the rule-based confidence factor); the ML-based selection for the room outline (and in some cases the ML-based confidence factor); the CAD vector-image; and the text database. The room decision engine 1920 is designed and constructed to choose between the rule-based selection and the ML-based selection, the choice based on CAD vector-image 218 (FIG. 2 ), the text database 214 (FIG. 2 ), and in some cases the rule-based and ML-based confidence factors. The resultant of the example room decision engine 1920 may be the selection of a final room outline (e.g., a raster-image), from which a polygon may be created to represent the final room outline. The specification now turns to wall extraction 1922.

—Wall Extraction

Still referring to FIG. 19 . The next step in the example method is wall extraction 1922. In summary, the method associated with the wall extraction 1922 takes a plurality of final room outlines, one for each room on the floor, and extracts or determines from the final room outlines the locations of walls between the rooms. Stated otherwise, each final room outline may be conceptually described as the footprint of the room where the walls defining the room meet the floor. Inasmuch as walls between rooms have a thickness, the final room outlines for otherwise contiguous rooms may have a space or distance between them. The wall extraction 1922 thus finds the thickness of the walls, and helps form the basis for the walls shown in the indoor map created for the floor. It follows that the example wall extraction 1922 is provided the final room outlines for the rooms on the floor.

The portions of FIG. 19 discussed to this point have assumed operation on a single room on a designated floor. That is, the three parallel post processing steps are provided a room-level bounding line (from the room-level machine-learning algorithms 1700 (FIG. 17 )) for a single room on the floor. By contrast, the wall extraction 1922 operates using a plurality of final room outlines. It follows that the example post processing steps, and follow-on evaluators and room decision engine, are instantiated or run separately for each room on the floor. So as not to unduly complicate the figure, FIG. 19 does expressly show the providing all the final room outlines to the wall extraction 1922; however, one having ordinary skill, with the benefit of this disclosure, now understands that wall extraction 1922 (as well as the merging rooms and walls algorithms 1924) operate after a plurality of final room outlines are created by the preceding steps.

FIGS. 27A and 27B show a flow diagram of the example wall extraction 1922. The wall extraction 1922 can be conceptually divided into identifying and filling wall spaces 2700, identifying walls 2702, and door cropping 2704. Each will be addressed in turn.

—Identifying and Filling Wall Spaces

Referring initially to FIG. 27A, in the example method the first step is identifying and filling wall spaces 2700. The example method takes as input the plurality of final room outlines from the previous steps. In example cases, each of the final room outlines may be converted from a raster-image to a vector-image or a CAD drawing, such that each final room outline is provided in the form a polygon. Considering then the plurality of final room outlines, the example identifying and filling wall spaces 2700 receives a plurality of polygons from the post processing, as shown by block 2706. In example cases, the polygons are inflated by a predetermined inflation percentage, as shown by process 2708. As discussed with respect to other inflation processes, the inflation may cause at least some of the inflated structures to touch, merge, overlap, or otherwise “connect up.” In some cases, all the polygons are inflated. In other example cases, the inflation may be more targeted. For example, in some cases the inflation of the polygons may only be toward empty spaces. If two or more polygons can be used to expand into empty space, the polygon that that can fill the most area may be selected for inflation.

Regardless of the precise mechanism for the inflation, the next step in the example method may be merging polygons to find an outer polygon, and then deflating the merged entity, as shown by processing 2710. The input polygons may then be combined with the deflated outer polygons to find the empty regions, as shown by process 2712. Conceptually here, the empty regions may be wall spaces or wall areas between rooms. The empty regions may then be filled by inflating certain of the polygons into the empty regions, as shown by process 2714. In some cases, a solution is found in which a reduced number polygons, less than all the polygons, are inflated to fill the empty spaces, and in some cases a solution is selected in which a minimum number of polygons are inflated. Regardless of the precise method of inflation to fill the empty spaces, the resultant is a set of final wall polygons (e.g. a vector-image, or a CAD drawing) that depicts the walls on the floor.

—Identifying Walls

Referring to FIG. 27B, the next step in the example method is identifying the walls 2702. In particular, the example method receives the set of final wall polygons, and both inflates and deflates the each member of the set of final wall polygons, as shown by process 2716. The inflated polygons are merged, as shown by process 2718, and then the merged polygons are deflated, as shown by process 2720. The resultant may be an outer polygon defining a bounding line of the rooms as a group. The deflated polygons are then merged with the outer polygon, as shown by process 2722. From the merged entities, the areas between polygons are extracted or identified as walls between and surround the rooms, as shown by process 2724. Any areas within the floor-level outline and the walls may thus be identified as hallways or walkways. The resultant is a set of walls defined within the floor-level outline, the resultant in any suitable form (e.g., vector-image, CAD drawing).

—Door Cropping

The next step in the example method is door cropping 2704. The example door cropping 2704 procedure takes as input: the set of walls within the floor-level outline from the identifying walls 2702 procedure; the furniture entities from the furniture detection 106 (FIG. 1 ); and the CAD vector-image 218 (FIG. 2 ). As mentioned with respect to furniture detection, the example furniture detection 106 identifies not only furniture entities (e.g., tables, desks, chairs), but also identifies door entities and associated location. The example door cropping 2704 thus gets door entity and associated location information, as shown by process 2730. The example process then identifies the door entities from the CAD vector-image, as shown by process 2732. Bounding boxes or bounding lines are found for each door, as shown by process 2734, and using the bounding lines the walls are removed or cropped to show doorways between each room, as shown by process 2736. The resultant 2738 is a vector-image or CAD drawing showing rooms, doorways, and walkways on the floor.

—Merging Rooms and Walls

Returning to FIG. 19 , the next step in the example method is merging the rooms and walls 1924. In particular, the example merging may combine resultant 2738 FIG. 27 with room identity information to label each room with its intended purpose according to the original CAD drawings.

FIGS. 28A, 28B, 28C, and 28D graphically show an example of the wall extraction 1922. Referring initially to FIG. 28A, the upper-left drawing 2800 shows an example plurality of final room outlines from the previous steps. In example cases, the polygons are inflated by a predetermined inflation percentage, as shown drawing 2802. The example inflation causes not only the outer boundary to increase in size, but also may cause at least some of the inflated polygons to touch, merge, overlap, or otherwise “connect up.” The inflated polygons are merged and deflated, as shown by drawing 2804. The input polygons may then be combined with the deflated outer polygon to find the empty regions, as shown by the white spaces in the upper-right drawing 2806. Again, conceptually here the empty regions may be wall spaces or wall areas between rooms. The empty regions may then be “filled” by inflating certain of the polygons into the empty regions, such as finding a solution in which a reduced number of polygons is inflated to fill the empty spaces. The three lower-left drawings 2808 show a visual example of selective inflation to fill the empty regions. In particular, polygons 2820 and 2822 are inflated to fill the wall spaces with respect to each other and polygon 2824. The resultant is a set of final wall polygons as shown by the lower-right drawing 2830.

Now referring to FIG. 28B. The next step in the example method is identifying the walls 2702. The example method receives the set of final wall polygons, as shown by upper-left drawing 2840, and both inflates (drawing 2842) and deflates (lower-left drawing 2844) each member of the set of final wall polygons. The inflated polygons are merged with the resultant being outer polygon as shown by drawing 2846, and then the outer polygon is deflated as shown by upper-right drawing 2848. The deflated polygons shown by the lower-left drawing 2844 are then merged with the outer polygon, as shown drawing 2850. From the merged entities, the areas between polygons are extracted or identified as walls between and surround the rooms, and any areas within the floor-level outline (not specifically shown) and the walls may thus be identified as hallways or walkways.

Now referring to FIG. 28C. The next step in the example method is door cropping 2704. The example door cropping 2704 procedure starts with the set of walls within the floor-level outline from the identifying walls 2702 procedure, as shown by the upper-left drawing 2860. From the furniture entities a set of door entity bounding boxes or bounding lines are determined, including location of the door entity bounding lines relative to the identified walls. In the example upper-left drawing 2860, three example door entity bounding lines are shown. The example door cropping 2704 procedure crops the walls based on location of the door entity bounding boxes. For example, the middle drawing 2862 shows an example bounding line 2864 for a door entity, and also shows the CAD vector-image of the door within the bounding line 2864. Using the bounding lines the walls are removed or cropped to show doorways between each room, as shown by lower-drawing 2870. The resultant is an image, in any suitable file format, showing the rooms on the floor, including the doorways into the various rooms and hallways on the floor.

Now referring to FIG. 28D. The next step in the example method is merging the rooms and walls 1924. In particular, the example merging may combine resultant 2738 (FIG. 27 ) with room identity information to label each room with its intended purpose according to the original CAD drawings. Thus, the example image shows an example floor (e.g., floor 2) with several meeting rooms, offices, and stairs. Notice the doorways, room labels, and furniture placement.

Export

Returning to FIG. 1 , the final step in the example method is export 110. In example methods is taking the final floor image, one for each floor, and creating indoor maps suitable for indoor navigation. In one example case, each final floor image is exported into a GeoJSON format, though any suitable indoor map format may be used. The various examples discussed may be implemented with little or no human interaction, and thus greatly improves the speed and quality of creating indoor maps from CAD drawings.

Example Computer Environment

FIG. 29 shows an example computer system 2900 which can perform any one or more of the methods described herein, in accordance with one or more aspects of the present disclosure. The computer system 2900 may be capable of executing any or all of the processes, machine-learning models, post processes, evaluators, decision engines embodied in FIG. 1 and the remaining figures. The computer system may be connected (e.g., networked) to other computer systems in a LAN, an intranet, an extranet, or the Internet. The computer system may operate in the capacity of a server in a client-server network environment. The computer system may be a personal computer (PC), a tablet computer, a set-top box (STB), a personal Digital Assistant (PDA), or any device capable of executing a set of instructions (sequential or otherwise) that specify actions to be taken by that device. Further, while only a single computer system is illustrated, the term “computer” shall also be taken to include any collection of computers that individually or jointly execute a set (or multiple sets) of instructions to perform any one or more of the methods discussed herein.

The computer system 2900 includes a processing device 2902, a volatile memory 2904 (e.g., random access memory (RAM)), a non-volatile memory 2906 (e.g., read-only memory (ROM), flash memory, solid state drives (SSDs), and a data storage device 2908, the foregoing of which are enabled to communicate with each other via a bus 2910.

Processing device 2902 represents one or more general-purpose processing devices such as a microprocessor, central processing unit, or the like. More particularly, the processing device 2902 may be a complex instruction set computing (CISC) microprocessor, reduced instruction set computing (RISC) microprocessor, very long instruction word (VLIW) microprocessor, or a processor implementing other instruction sets or processors implementing a combination of instruction sets. The processing device 2902 may also be one or more special-purpose processing devices such as an application specific integrated circuit (ASIC), a system on a chip, a field programmable gate array (FPGA), a digital signal processor (DSP), network processor, or the like. The processing device 2902 may include more than one processing device, and each of the processing devices may be the same or different types. The processing device 2902 is configured to execute instructions for performing any of the operations and steps discussed herein.

The computer system 2900 may further include a network interface device 2912. The network interface device 2912 may be configured to communicate data (e.g., original CAD drawings, final indoor maps) via any suitable communication protocol. In some embodiments, the network interface devices 2912 may enable wireless (e.g., WiFi, Bluetooth, ZigBee, etc.) or wired (e.g., Ethernet, etc.) communications. The computer system 2900 also may include a video display 2914 (e.g., a liquid crystal display (LCD), a light-emitting diode (LED), an organic light-emitting diode (OLED), a quantum LED, a cathode ray tube (CRT), a shadow mask CRT, an aperture grille CRT, or a monochrome CRT), one or more input devices 2916 (e.g., a keyboard or a mouse), and one or more speakers 2918 (e.g., a speaker). In one illustrative example, the video display 2914 and the input device(s) 2916 may be combined into a single component or device (e.g., an LCD touch screen).

The network interface 2912 may transmit and receive data from a computer system application programming interface (API). The data may pertain to any suitable information described herein, such as a remaining useful life of floor outlines, room outlines, furniture identities and location, and indoor maps, among other information.

The data storage device 2908 may include a computer-readable storage medium 2920 on which the instructions 2922 embodying any one or more of the methods, operations, or functions described herein is stored. The instructions 2922 may also reside, completely or at least partially, within the volatile memory 2904 or within the processing device 2902 during execution thereof by the computer system 2900. As such, the volatile memory 2904 and the processing device 2902 also constitute computer-readable media. The instructions 2922 may further be transmitted or received over a network via the network interface device 2912.

While the computer-readable storage medium 2920 is shown in the illustrative examples to be a single medium, the term “computer-readable storage medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, or associated caches and servers) that store the one or more sets of instructions. The term “computer-readable storage medium” shall also be taken to include any medium capable of storing, encoding, or carrying a set of instructions for execution by the machine, where such set of instructions cause the machine to perform any one or more of the methodologies of the present disclosure. The term “computer-readable storage medium” shall accordingly be taken to include, but not be limited to, solid-state memories, optical media, and magnetic media.

The following clauses define various examples. The clauses are presented as computer-implemented method claims, but such clauses may be equivalently stated as non-transitory computer-readable medium claims and/or computer system claims:

Clause 1. A computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; determining, by a device, a floor depicted in the CAD drawing by applying the CAD raster-image, the CAD vector-image, and the text database to a floor-level machine-learning algorithm, the determining results in a floor-level outline; sensing, by a device, furniture depicted on the floor by applying the floor-level outline, the CAD vector-image, and the text database to a furniture-level machine-learning algorithm, the sensing creates a set of furniture entities; identifying, by a device, each room depicted in the CAD drawing by applying the floor-level outline, the set of furniture entities, CAD vector-image, and the text database to room-level machine-learning algorithm, the identifying creates a plurality of room-level outlines; and creating, by a device, an indoor map by combining the set of furniture entities and the plurality of room-level outlines.

Clause 2. The computer-implemented method of clause 1 wherein the preprocessing further comprises: removing, by a device, text in the original CAD drawing to create the modified CAD drawing having at least some of the text removed; and creating the CAD vector-image and the CAD raster-image from the modified CAD drawing.

Clause 3. The computer-implemented method of any preceding clause wherein the preprocessing further comprises: removing, by a device, leader lines and text in the original CAD drawing to create the modified CAD drawing having at least some leader lines and at least some text removed; and creating the CAD vector-image and the CAD raster-image from the modified CAD drawing.

Clause 4. The computer-implemented method of any preceding clause wherein the preprocessing further comprises: removing, by a device, cross-hatching in the original CAD drawing to create modified CAD drawing having at least some of the cross-hatching removed; and creating the CAD vector-image and the CAD raster-image from the modified CAD drawing.

Clause 5. The computer-implemented method of any preceding clause wherein the preprocessing further comprises: removing, by a device, a plurality words being text in the original CAD drawing to create the modified CAD drawing; and creating, by a device, the text database including the plurality of words and location information for each word of the plurality of words, the location information indicative of location of each word in the original CAD drawing.

Clause 6. The computer-implemented method of any preceding clause wherein preprocessing further comprises: removing, by a device, duplicate furniture entities in the original CAD drawing to create the modified CAD drawing having at least some duplicate furniture removed; and creating, by a device, the CAD vector-image and the CAD raster-image from the modified CAD drawing.

Clause 7. The computer-implemented method of clause 6 wherein removing duplicate furniture entities further comprises removing duplicate furniture entities located within a predetermined distance of each other.

Clause 8. The computer-implemented method of any preceding clause wherein determining the floor depicted further comprises: creating, by a device, a floor bounding line that delineates the floor; converting, by a device, the floor bounding line into an intermediate CAD drawing; overlaying, by a device, the intermediate CAD drawing and the modified CAD drawing; removing, by a device, drawing-entities that are a predetermined distance outside the floor bounding line; removing, by a device, drawing-entities that are a predetermine distance within the floor bounding line; and creating, by a device, a floor-level outline from the remaining drawing-entities.

Clause 9. The computer-implemented method of any preceding clause wherein applying the floor-level bounding line, the CAD vector-image, and the text database to the furniture-level machine-learning algorithm further comprises: reading, by a device, scale information from the original CAD drawing; gridding, by a device, the CAD vector-image into a plurality of grids having predetermined size based on the scale information; sensing, by a device, furniture within each grid of the plurality of grids; and creating the set of furniture entities.

Clause 10. The computer-implemented method of clause 9 further comprising removing, by a device, from the CAD vector-image duplicate furniture entities detected within each grid.

Clause 11. The computer-implemented method of any preceding clause wherein identifying each room depicted in the CAD drawing further comprises, for each room-level outline: creating, by a device, a first set of probability distributions regarding identity of the room, the first set of probability distributions created based on graphical analysis; creating, by a device, a second set of probability distributions regarding identity of the room, the second set of probability distributions created based on textual analysis; and selecting, by a device, a final room identity by applying the first and second sets of probability distributions to a room-identity machine-learning algorithm, the room-identity machine-learning algorithm selects the final room identity.

Clause 12. The computer-implemented method of clause 11 wherein selecting the final room identity further comprises applying the set of furniture entities to the room-identity machine-learning algorithm.

Clause 13. A computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing and thereby creating a modified CAD drawing, a text database containing text from the modified CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; creating, by a device, a floor-level bounding line that encircles a floor depicted in the modified CAD drawing, the creating by applying the CAD raster-image, the CAD vector-image, and the text database to a floor-level machine-learning algorithm; applying, by a device, an active contour model to an initial floor-level segmentation created from the floor-level bounding line, the active contour model creates an intermediate floor outline that delineates the floor; removing, by a device, drawing-entities from the modified CAD drawing that are a predetermine distance away from the intermediate floor outline to create a final floor outline; and creating, by a device, an indoor map for the floor using the final floor outline.

Clause 14. The computer-implemented method of clause 13 further comprising, prior to removing drawing-entities, smoothing, by a device, the intermediate floor outline by: selecting an incremental length of the intermediate floor outline, the incremental length comprising a plurality of line segments; measuring an attribute of linearity for a set of contiguous line segments within the incremental length; replacing the set of contiguous line segments with a single line segment if the attribute of linearity is above a predetermined threshold; performing the measuring and replacing for each set of contiguous line segments within the incremental length; and repeating the selecting, the measuring, the replacing, and the performing for at least a majority of a length of the intermediate floor outline.

Clause 15. The computer-implemented method of clause 14 wherein measuring the attribute of linearity further comprises measuring an altitude of a triangle formed by the set of contiguous line segments and a base connecting ends of the set of contiguous line segments.

Clause 16. The computer-implemented method of any of clauses 13-15 wherein removing drawing-entities further comprises: removing drawing-entities that are a predetermined distance outside the intermediate floor outline; and removing drawing-entities that are a predetermine distance within the intermediate floor outline.

Clause 17. The computer-implemented method of any of clauses 13-16 wherein removing drawing-entities further comprises: inflating the intermediate floor outline by a predetermined amount to create an inflated bounding line; removing drawing-entities of the modified CAD drawing that reside outside the inflated bounding line; deflating the intermediate floor outline by a predetermined amount to create a deflated bounding line; removing drawing-entities of the modified CAD drawing that reside inside the deflated bounding line; and generating the final floor outline from drawing-entities remaining between the inflated bounding line and the deflated bounding line.

Clause 18. The computer-implemented method of clause 17 further comprising, prior to creating the indoor map: identifying drawing-entities that reside between the inflated bounding line and the deflated bounding line and whose size is below a predetermined size, the identifying creates spanned entities; and removing the spanned entities from the modified CAD drawing; and generating the final floor outline from drawing-entities remaining between the inflated bounding line and the deflated bounding line.

Clause 19. The computer-implemented method of clause 17 further comprising identifying duplicate entities that reside between the inflated bounding line and the deflated bounding line, and removing the duplicate entities.

Clause 20. The computer-implemented method of clause 17 further comprising identifying an unconnected vertex that resides between the inflated line and the deflated line, and removing the unconnected vertex.

Clause 21. The computer-implemented method of clause 17 further comprising at least one selected from a group comprising: inflating the intermediate floor outline by greater than 5% (five percent) of a wall length of the intermediate floor outline; inflating the intermediate floor outline by 10% (ten percent) of the wall length of the intermediate floor outline; deflating the intermediate floor outline by more than 5% (five percent) of the wall length of the intermediate floor outline; and deflating the intermediate floor outline by 10% (ten percent) of the wall length of the intermediate floor outline.

Clause 22. The computer-implemented method of any of clauses 13-21 further comprising, after removing drawing-entities: dilating, by a device, drawing-entities within the modified CAD drawing to create dilated entities; unioning, by a device, the dilated entities to create a union shape; and finding, by a device, a closed-loop path within the union shape.

Clause 23. The computer-implemented method of clause 22 wherein finding the closed-loop path further comprises: determining, by a device, an internal outline and an external outline of the union shape; inflating, by a device, the internal outline; deflating, by a device, the external outline; selecting the closed-loop path having a reduced vertex shape; and generating the final floor outline based on the closed-loop path having the reduced vertex shape.

Clause 24. The computer-implemented method of clause 23 wherein determining the internal outline further comprises: creating, by a device, an intermediate raster-image from the modified CAD drawing; and applying, by a device, an expanding active contour model to the intermediate raster-image, the expanding active contour model creates the internal outline.

Clause 25. The computer-implemented method of clause 23 wherein determining the external outline further comprises applying, by a device, a contracting active contour model to the intermediate raster-image, the contracting active contour model creates the external outline.

Clause 26. A computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; determining, by a device, a floor depicted in the CAD drawing, the determining results in a floor-level bounding line; sensing, by a device, furniture depicted on the floor by applying the floor-level bounding line, the CAD vector-image, and the text database to machine-learning algorithms, the sensing results in a plurality of furniture entities and associated location information; identifying, by a device, each room depicted in the CAD drawing within the floor-level bounding line, the identifying results in a plurality of room outlines; and creating, by a device, an indoor map for the floor by combining the plurality of furniture entities and associated location information with the plurality of room outlines.

Clause 27. The computer-implemented method of clause 26 wherein sensing the furniture depicted on the floor further comprises: providing the floor-level bounding line and the CAD vector-image to a furniture-level machine-learning algorithm, the furniture-level machine-learning algorithm generates furniture bounding lines; administering a parsed version of the text database to a text-level machine-learning algorithm, the text-level machine-learning algorithm generates intermediate furniture identities with associated intermediate location information; and applying the furniture bounding lines and the intermediate furniture identities to an ensemble machine-learning algorithm, the ensemble machine-learning algorithm selects final-furniture bounding lines and identity information; and post processing the final-furniture bounding lines and identity information, the post processing generates the furniture entities and the associated location information.

Clause 28. The computer-implemented method of clause 27 wherein the furniture bounding lines includes at least one bounding line identifying a door.

Clause 29. The computer-implemented method of clause 27: wherein, prior to the providing, the method further comprises: reading, by a device, scale information from the original CAD drawing; gridding, by a device, a portion of the CAD vector-image identified by the floor-level bounding line into a plurality of grids having a predetermined size based on the scale information; and wherein providing further comprises providing the plurality of grids to the furniture-level machine-learning algorithm; and wherein post processing further comprises removing duplicate furniture detections from the furniture entities.

Clause 30. The computer-implemented method of clause 29 wherein gridding further comprises selecting plurality of grids, each grid of the plurality defines an area that overlaps at least one neighboring grid by a predetermined percentage.

Clause 31. The computer-implemented method of clause 27 wherein post processing further comprises replacing, the modified CAD drawing, the furniture entities with predetermined furniture entities.

Clause 32. A computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; creating, by a device, a floor-level outline; sensing, by a device, furniture depicted on the floor, the sensing creates set of furniture entities; identifying, by a device, a room depicted in the CAD drawing by: applying the floor-level outline and the CAD vector-image to a first machine-learning algorithm to produce a room-level bounding line and a first probability distribution regarding identity of the room; applying the room-level bounding line and the text database to a second machine-learning algorithm to produce a second probability distribution regarding identity of the room; applying the first and second probability distributions to a third machine-learning algorithm to generate a room identity; and selecting, based on the room-level bounding line, a room-level outline; and creating, by a device, the indoor map for a floor using the floor-level outline, the room-level outline and the room identity.

Clause 33. The computer-implemented method of clause 32 wherein applying to the third machine-learning algorithm further comprises applying the furniture entities to the third machine-learning algorithm to generate the room identity.

Clause 34. The computer-implemented method of any of clauses 32-33 wherein identifying the room further comprises identifying each room on the floor depicted in the CAD drawing, each room having a respective room-level segmentation mask and a respective room identity.

Clause 35. The computer-implemented method of any of clauses 32-34 wherein selecting the room-level outline further comprises: creating, by a device, an entity-based bounding line by applying the room-level bounding line to an entity-based post processing algorithm, the entity-based post processing algorithm creates the entity-based bounding line; creating, by a device, a graph-based bounding line by applying the room-level bounding line to a graph-based post processing algorithm, the graph-based post processing algorithm generates the graph-based bounding line; creating, by a device, a GAN-based bounding line by applying the room-level bounding line to a GAN-based post processing algorithm, the GAN-based post processing algorithm generates the GAN-based bounding line; and choosing, by a device, only one of the entity-based bounding line, the graph-based bounding line, or the GAN-based bounding line be the room-level outline.

Clause 36. The computer-implemented method of clause 35 wherein choosing the room-level outline further comprises: evaluating, by a device, the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line by a rule-based evaluator, the evaluating results in a rule-based selection; evaluating, by a device, the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line by a selection machine-learning algorithm, the evaluating by the selection machine learning algorithm results in a ML-based selection; and choosing, by device, only one of the rule-based selection or the ML-based selection to be the room-level outline.

Clause 37. The computer-implemented method of clause 35 wherein creating the room-level bounding line further comprises: inflating the room-level bounding line to create an inflated bounding line; deflating the room-level bounding line to create a deflated bounding line; selecting a set of remaining entities based on drawing-entities that reside between the inflated bounding line and the deflated bounding line; and creating the entity-based bounding line from the set of remaining entities.

Clause 38. The computer-implemented method of clause 37 wherein creating the entity-based bounding line further comprises: grouping drawing-entities with respect to slope, the grouping results in a plurality of groups of drawing-entities; and for each group of drawing-entities, merging drawing-entities that meet a predetermined distance criteria and a predetermined overlap criteria; and the grouping and merging result in the set of remaining drawing-entities.

Clause 39. The computer-implemented method of clause 38 wherein creating the entity-based bounding line further comprises: dilating, by a device, the remaining drawing-entities to create dilated entities; unioning, by a device, the dilated entities to create a union shape; determining, by a device, an internal outline and an external outline of the union shape; inflating, by a device, the internal outline; deflating, by a device, the external outline; and selecting, as between the internal outline and the external outline, a reduced vertex shape to be the entity-based bounding line.

Clause 40. The computer-implemented method of clause 35 wherein creating the graph-based bounding line further comprises: inflating the room-level bounding line to create an inflated bounding line; deflating the room-level bounding line to create a deflated bounding line; selecting a set of remaining entities being drawing-entities that reside between the inflated bounding line and the deflated bounding line; and creating the graph-based bounding line from the set of remaining entities.

Clause 41. The computer-implemented method of clause 40 wherein creating the graph-based bounding line further comprises: grouping drawing-entities of the set of remaining drawing-entities with respect to slope, the grouping results in groups of drawing-entities; for each group of drawing-entities, selecting an outer drawing-entity closest to the room-level bounding line, the selecting for each group of drawing-entities results in a set of outer line segments; and extending at least one of line segment of the set of outer line segments; and wherein creating the graph-based bounding line further comprises creating the graph-based bounding line from the set of outer line segments.

Clause 42. The computer-implemented method of clause 41 wherein extending at least one line segment of the set of outer line segments further comprises: for each line segment of the set of outer line segments, extending each line segment to meet the room-level bounding line on each end the line segment; adding a plurality of intersections one each at each location where each line segment of the set of outer line segments intersect; and assigning line segments extending between the plurality of intersections to be the set outer line segments.

Clause 43. The computer-implemented method of clause 35 wherein creating the GAN-based bounding line further comprises: creating, by a device, a first plurality of intermediate bounding lines by a first machine-learning algorithm; creating, by a device, a second plurality of intermediate bounding lines a second machine-learning algorithm; and creating the GAN-based bounding line by convolving the first plurality and second plurality of intermediate bounding lines.

Clause 44. The computer-implemented method of clause 43: wherein creating the first plurality of intermediate bounding lines further comprises applying a cropped raster image to the first machine-learning algorithm, the cropped raster image showing the room; and wherein creating the second plurality of intermediate bounding lines further comprises applying the room-level bounding line to the second machine-learning algorithm.

The above discussion is meant to be illustrative of the principles and various embodiments of the present invention. Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. For example. It is intended that the following claims be interpreted to embrace all such variations and modifications. 

What is claimed is:
 1. A computer-implemented method of creating an indoor map from a CAD drawing, the method comprising: preprocessing, by a device, an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; creating, by a device, a floor-level outline; sensing, by a device, furniture depicted on the floor, the sensing creates set of furniture entities; identifying, by a device, a room depicted in the CAD drawing by: applying the floor-level outline and the CAD vector-image to a first machine-learning algorithm to produce a room-level bounding line and a first probability distribution regarding identity of the room; applying the room-level bounding line and the text database to a second machine-learning algorithm to produce a second probability distribution regarding identity of the room; applying the first and second probability distributions to a third machine-learning algorithm to generate a room identity; and selecting, based on the room-level bounding line, a room-level outline; and creating, by a device, the indoor map for a floor using the floor-level outline, the room-level outline, and the room identity.
 2. The computer-implemented method of claim 1 wherein applying to the third machine-learning algorithm further comprises applying the furniture entities to the third machine-learning algorithm to generate the room identity.
 3. The computer-implemented method of claim 1 wherein identifying the room further comprises identifying each room on the floor depicted in the CAD drawing, each room having a respective room-level segmentation mask and a respective room identity.
 4. The computer-implemented method of claim 1 wherein selecting the room-level outline further comprises: creating, by a device, an entity-based bounding line by applying the room-level bounding line to an entity-based post processing algorithm, the entity-based post processing algorithm creates the entity-based bounding line; creating, by a device, a graph-based bounding line by applying the room-level bounding line to a graph-based post processing algorithm, the graph-based post processing algorithm generates the graph-based bounding line; creating, by a device, a GAN-based bounding line by applying the room-level bounding line to a GAN-based post processing algorithm, the GAN-based post processing algorithm generates the GAN-based bounding line; and choosing, by a device, only one of the entity-based bounding line, the graph-based bounding line, or the GAN-based bounding line be the room-level outline.
 5. The computer-implemented method of claim 4 wherein choosing the room-level outline further comprises: evaluating, by a device, the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line by a rule-based evaluator, the evaluating results in a rule-based selection; evaluating, by a device, the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line by a selection machine-learning algorithm, the evaluating by the selection machine learning algorithm results in a ML-based selection; and choosing, by device, only one of the rule-based selection or the ML-based selection to be the room-level outline.
 6. The computer-implemented method of claim 4 wherein creating the room-level bounding line further comprises: inflating the room-level bounding line to create an inflated bounding line; deflating the room-level bounding line to create a deflated bounding line; selecting a set of remaining entities based on the drawing entities that reside between the inflated bounding line and the deflated bounding line; and creating the entity-based bounding line from the set of remaining entities.
 7. The computer-implemented method of claim 6 wherein creating the entity-based bounding line further comprises: grouping drawing entities with respect to slope, the grouping results in a plurality of groups of drawing entities; and for each group of drawing entities, merging drawing entities that meet a predetermined distance criteria and a predetermined overlap criteria; the grouping and merging result in the set of remaining drawing entities.
 8. The computer-implemented method of claim 4 wherein creating the graph-based bounding line further comprises: inflating the room-level bounding line to create an inflated bounding line; deflating the room-level bounding line to create a deflated bounding line; selecting a set of remaining entities being drawing entities that reside between the inflated bounding line and the deflated bounding line; and creating the graph-based bounding line from the set of remaining entities.
 9. The computer-implemented method of claim 8 wherein creating the graph-based bounding line further comprises: grouping drawing entities of the set of remaining drawing entities with respect to slope, the grouping results in groups of drawing entities; for each group of drawing entities, selecting an outer drawing entity closest to the room-level bounding line, the selecting for each group of drawing entities results in a set of outer line segments; and extending at least one of line segment of the set of outer line segments; and wherein creating the graph-based bounding line further comprises creating the graph-based bounding line from the set of outer line segments.
 10. The computer-implemented method of claim 4 wherein creating the GAN-based bounding line further comprises: creating, by a device, a first plurality of intermediate bounding lines by a first machine-learning algorithm; creating, by a device, a second plurality of intermediate bounding lines by a second machine-learning algorithm; creating the GAN-based bounding line by convolving the first plurality and second plurality of intermediate bounding lines.
 11. The computer-implemented method of claim 10: wherein creating the first plurality of intermediate bounding lines further comprises applying a cropped raster image to the first machine-learning algorithm, the cropped raster image showing the room; and wherein creating the second plurality of intermediate bounding lines further comprises applying the room-level bounding line to the second machine-learning algorithm.
 12. A computer system comprising: a processor; a memory coupled to the processor, the memory storing instruction that, when executed by the processor, cause the processor to: preprocess an original CAD drawing to create a modified CAD drawing, a text database containing text from the original CAD drawing, a CAD vector-image of the modified CAD drawing, and a CAD raster-image of the modified CAD drawing; create a floor-level outline; sense furniture depicted on the floor, the sensing creates set of furniture entities; identify a room depicted in the CAD drawing by causing the processor to: apply the floor-level outline and the CAD vector-image to a first machine-learning algorithm to produce a room-level bounding line and a first probability distribution regarding identity of the room; apply the room-level bounding line and the text database to a second machine-learning algorithm to produce a second probability distribution regarding identity of the room; apply the first and second probability distributions to a third machine-learning algorithm to generate a room identity; and select, based on the room-level bounding line, a room-level outline; and create an indoor map for a floor using the floor-level outline, the room-level outline, and the room identity.
 13. The computer system of claim 12 wherein when the processor applies the first and second probability distributions to the third machine-learning algorithm, the instructions further cause the processor to apply the furniture entities to the third machine-learning algorithm to generate the room identity.
 14. The computer system of claim 12 wherein when the processor selects the room-level outline, the instructions further cause the processor to: create an entity-based bounding line by applying the room-level bounding line to an entity-based post processing algorithm, the entity-based post processing algorithm creates the entity-based bounding line; create a graph-based bounding line by applying the room-level bounding line to a graph-based post processing algorithm, the graph-based post processing algorithm generates the graph-based bounding line; create a GAN-based bounding line by applying the room-level bounding line to a GAN-based post processing algorithm, the GAN-based post processing algorithm generates the GAN-based bounding line; and choose only one of the entity-based bounding line, the graph-based bounding line, or the GAN-based bounding line be the room-level outline.
 15. The computer system of claim 14 wherein when the processor chooses the room-level outline, the processor further causes the processor to: evaluate the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line by a rule-based evaluator, the evaluation results in a rule-based selection; evaluate the entity-based bounding line, the graph-based bounding line, and the GAN-based bounding line by a selection machine-learning algorithm, the evaluating by the selection machine learning algorithm results in a ML-based selection; and choose only one of the rule-based selection or the ML-based selection to be the room-level outline.
 16. The computer system of claim 14 wherein when the processor creates the room-level bounding line, the instructions further cause the processor to: inflate the room-level bounding line to create an inflated bounding line; deflate the room-level bounding line to create a deflated bounding line; select a set of remaining entities based on the drawing entities that reside between the inflated bounding line and the deflated bounding line; and create the entity-based bounding line from the set of remaining entities.
 17. The computer system of claim 16 wherein when the processor creates the entity-based bounding line, the instructions further cause the processor to: group drawing entities with respect to slope, the grouping results in a plurality of groups of drawing entities; and for each group of drawing entities, merge drawing entities that meet a predetermined distance criteria and a predetermined overlap criteria; the grouping and merging result in the set of remaining drawing entities.
 18. The computer system of claim 14 wherein when the processor creates the graph-based bounding line, the instructions further cause the processor to: inflate the room-level bounding line to create an inflated bounding line; deflate the room-level bounding line to create a deflated bounding line; select a set of remaining entities being drawing entities that reside between the inflated bounding line and the deflated bounding line; and create the graph-based bounding line from the set of remaining entities.
 19. The computer system of claim 18 wherein when the processor creates the graph-based bounding line, the instructions further cause the processor to: group drawing entities of the set of remaining drawing entities with respect to slope, the grouping results in groups of drawing entities; for each group of drawing entities, select an outer drawing entity closest to the room-level bounding line, the selection for each group of drawing entities results in a set of outer line segments; and extend at least one of line segment of the set of outer line segments; and wherein when the processor creates the graph-based bounding line, the instructions further cause the processor to create the graph-based bounding line from the set of outer line segments.
 20. The computer system of claim 14 wherein when the processor creates the GAN-based bounding line, the instructions further cause the processor to: create a first plurality of intermediate bounding lines by a first machine-learning algorithm; create a second plurality of intermediate bounding lines by a second machine-learning algorithm; and create the GAN-based bounding line by convolving the first plurality and second plurality of intermediate bounding lines. 